using System; namespace ConsoleApp3 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); if (s.EndsWith("ai")) s = s.Substring(0, s.Length - 2) + "AI"; else s += "-AI"; Console.WriteLine(s); } } }