solve s | matsubi = take (length s - 2) s ++ "AI" | otherwise = s ++ "-AI" where matsubi = drop (length s - 2) s == "ai" main = getLine >>= putStrLn . solve