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