#include #include #include using namespace std; int main(int argc, char* argv[]) { string S; cin>>S; string n; char *p=(char*)S.c_str(); while (*p!='\0'){ if (!memcmp(p,"hamu",4)){ n+="1"; p+=4; }else if (!memcmp(p,"ham",3)){ n+="0"; p+=3; }else{ p++; } } if (n.size()>0){ n+="0"; } p=(char*)n.c_str(); S.clear(); while (*p!='\0'){ if (*p=='0'){ S+="ham"; }else{ S+="hamu"; } p++; } cout<