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