#1499 羊が、何匹だっけ import re t=int(input()) for _ in range(t): s=input() n=re.search('\d+',s) print('Hitsuji ga {} hiki'.format(int(n[0])+1))