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