i = int(input()) for _ in range(i): l = input().split() l[2] = str(int(l[2])+1) print(" ".join(l))