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