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