T = int(input().strip()) lst = [] for i in range(T): tmp = list(map(str, input().strip().split(' '))) tmp[2] = str(int(tmp[2]) + 1) lst.append(' '.join(tmp)) for i in lst: print(i)