t = int(input()) for i in range(t): s, g, f, h = input().split() f = int(f) + 1 print(s + " " + g + " " + " " + str(f) + " " + h)