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