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