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