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