for i in range(int(input())): ls = input().split() ls[2] = str(int(ls[2])+1) for j in ls: print(j,end=" ") print()