#yuki1511 import re n=int(input()) for i in range(n): s=input() num=res=re.sub(r"\D","",s) x=int(num) x+=1 num=str(x) print('Hitsuji ga '+str(num)+' hiki')