// コピーして使う!
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
    string n;
    cin >> n;
    if (n != "ham") {
        cout << n << "ham" << endl;
    } else {
        cout << "ham" << endl;
    }
    system("pause");
}