n = int(input()) for i in range(n): a,b,c,d = map(str,input().split()) c = str(int(c)+1) print(a,b,c,d)