#include using namespace std; int main() { string N; cin >> N; if(N == "ham") cout << N << endl; else cout << N + "ham" << endl; }