#include #include #include #include #include #include #include #include #include #include #include #include #define mod 1000000007; using namespace std; typedef long long ll; typedef pair Pr; string s; int main() { cin >> s; string str = ""; for (int i = 0; i < s.size()-1; i++) { if (s[i] == 'm') { if (s[i + 1] == 'u') str += "1"; else str += "0"; } } ll num = 0; for (int i = 0; i < str.size(); i++) { num +=(ll) pow(2, str.size()-i-1)*(str[i]-'0'); } num *= 2; int a[51],i=0; while (num != 1) { if (num % 2 == 0) a[i++] = 1; else a[i++] = 0; num /= 2; } a[i++] = 0; for (int j = 0; j < i; j++) { if (a[j] == 1) cout << "hamu"; else cout << "ham"; } cout << endl; return 0; }