for i in range(int(input())): print("Hitsuji ga "+str(1+int(list(input().split())[2]))+" hiki")