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