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