t = int(input()) while t: t -= 1 a, b, c, d = input().split() c = int(c) + 1 print(a, b, c, d)