for _ in range(int(input())): s = input().split()[2] print("Hitsuji ga", int(s) + 1, "hiki")