using System; using System.Linq; class Program { static void Main(string[] args) { string n = Console.ReadLine(); Console.WriteLine(n == "hams" ? n : n + "ham"); } }