for _ in range(int(input())): S = input().split() S[2] = str(int(S[2]) + 1) print(*S)