#include using namespace std; using ll = int64_t; using P = std::pair; const int INF = 1e8; int main() { ios::sync_with_stdio(false); string s; cin >> s; if(s == "ham") { cout << s << endl; } else { cout << s + "ham" << endl; } }