import java.util.*; class A { static Scanner s = new Scanner("hamuhamhamu"); public static void main(String[] args) { System.out.println(Integer.toBinaryString(Integer.parseInt(s.nextLine().replaceAll("hamu", "1").replaceAll("ham", "0"),2)*2).replaceAll("1","hamu").replaceAll("0","ham")); } }