import java.util.*; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws Exception { String s = sc.next(); s = s.replace("hamu", "1"); s = s.replace("ham", "0"); int ret = Integer.parseInt(s, 2)*2; s = Integer.toBinaryString(ret); s = s.replace("1", "hamu"); s = s.replace("0", "ham"); System.out.println(s); } }