n=input().replace("hamu","1").replace("ham","0") num=int(n,2)*2 ans=bin(num)[2:] print(str(ans).replace("1","hamu").replace("0","ham"))