#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int main() { string str; cin >> str; if(str == "ham"){ cout << str << endl; }else{ cout << str << "ham" << endl; } return 0; }