using System; namespace No423{ public class Program{ public static void Main(string[] args){ var S = Console.ReadLine(); Console.WriteLine(Console.ReadLine() + (S == "ham" ? "" : "ham")); } } }