import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String humLanguage = br.readLine().replaceAll("hamu", "1").replaceAll("ham", "0"); int humNum = Integer.parseInt(humLanguage, 2); String ans = Integer.toBinaryString(humNum * 2); System.out.println(ans.replaceAll("1", "hamu").replaceAll("0", "ham")); br.close(); } }