def main(): for _ in range(int(input())): sheep = input().split() sheep[2] = int(sheep[2]) + 1 print(" ".join(map(str, sheep))) if __name__ == "__main__": main()