#include <iostream>
using namespace std;

int main(){
	string n;
	cin >> n;
	cout << (n == "ham" ? "ham" : n + "ham") << endl;
}