cnt = map(int, input()) for i in range(1, cnt): a, b, c, d = input().split() print(f'{a} {b} {int(c)+1} {d}')