for i in [0]*int(input()): s = input().split() s[2] = int(s[2]) + 1 print(*s)