#include using namespace std; int main(void) { string s; cin >> s; cout << s << (s == "ham" ? "" : "ham") << endl; return 0; }