T = int(input()) sheeps = [] for i in range(T): inputN = input() spritN = inputN.split() N = int(spritN[2]) sheeps.append(N+1) for i in range(T): print("Hitsuji ga",sheeps[i],"hiki")