T=int(input()) for i in range(0, T): S=input().split() print (S[0],S[1],int(S[2])+1,S[3])