n = int(input()) for _ in range(n): s = input().split() s[2] = int(s[2]) + 1 print(s)