T = int(input()) for _ in range(T): N = input().split() n = int(N[2]) + 1 N[2] = str(n) print(" ".join(N))