#include <stdio.h>

int main(void){
	char n[50];
	scanf("%s", n);

	if(n[3] == '\0')
		printf("%s\n", n);
	else
		printf("%sham\n", n);

	return 0;
}