""" """ import sys from sys import stdin T = int(input()) for loop in range(T): a,b,c,d = input().split() c = int(c) + 1 print (a,b,c,d)