ham = input() ham = ham.replace("hamu","1") ham = ham.replace("ham","0") if ham[0] == "0": pass else: ham = int(ham,2)*2 ham = format(ham,'b') ham = str(ham) ham = ham.replace("1","hamu") ham = ham.replace("0","ham") print(ham)