r='' for x in bin(int(input().replace('hamu','1').replace('ham','0'),2)*2)[2:]:r+=('ham','hamu')[x=='1'] print(r)