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