-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = putStrLn . solve =<< getLine solve s | r == "ia" = reverse t ++ "AI" | otherwise = s ++ "-AI" where (r, t) = splitAt 2 $ reverse s