import Data.Char
main = do all <- getContents
putStr (unlines (map processLine (lines all)))
processLine ln = let ws = words ln
ws2 = map reverse ws
in unwords ws2
main = do all <- getContents
putStr (unlines (map processLine (lines all)))
processLine ln = let ws = words ln
ws1 = filter (\ word -> length (filter (`elem` "AaIiUuEeOo") word) >= 3) ws
in unwords ws1