import Data.List (splitAt) main = do str <- getLine let l = length str (a, b) = splitAt (l - 2) str putStrLn $ if b == "ai" then a ++ "AI" else str ++ "-AI"