#include //#include //using namespace atcoder; using namespace std; using ll = long long; #define all(A) A.begin(),A.end() using vll = vector; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) int main() { string S; cin>>S; ll N=0; reverse(all(S)); ll k=2; rep(i,S.size()){ if(S[i]=='u'){ N+=k; i+=3; } else{ i+=2; } k*=2; } //cout< AN; while(N>0){ if(N%2==0){ AN.push_back("ham"); }else{ AN.push_back("hamu"); } N/=2; } if(N==0){ cout<<"ham"<