#include int main(){ char s[51]; scanf("%s",s); if(s[3]=='\0'){ printf("ham"); }else printf("%sham",s); return 0; }