T = int(input()) for i in range(T): a = list(input().split()) a[2] = str(int(a[2]) + 1) print(*a, sep = " ")