import Control.Monad import Data.Array import qualified Data.ByteString.Char8 as BS import Data.Char import Data.List import Data.Maybe readInts :: IO [Integer] readInts = map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine readStrings :: IO [BS.ByteString] readStrings = BS.words <$> BS.getLine splitBy :: (a -> Bool) -> [a] -> [[a]] splitBy p [] = [] splitBy p xs = a : splitBy p (dropWhile p b) where (a, b) = break p xs main :: IO () main = do s <- splitBy (== ',') <$> getLine putStrLn $ solve s solve = f where f [] = "Done!" f (x:xs) | x /= "AC" = "Failed..." | otherwise = f xs