#include using namespace std; int main(){ string str; cin >> str; if(str!="ham")cout << str+"ham" << endl; else cout << "ham" << endl; return 0; }