n = input() n1 = n.replace('hamu', '1') n2 = n1.replace('ham', '0') if n2[0] == '0': print(0) else: print(n + 'ham')