import Data.Char(isUpper)

main = do
    s <- getLine
    if accept s then putStrLn "AC"
                else putStrLn "WA"

accept :: String -> Bool
accept (s:xs) = s == 'A' && filter isUpper xs == "C" && (findC $ take (length xs-3) (tail xs))

findC :: String -> Bool
findC [] = False
findC (x:xs)
    | x == 'C'  = True
    | otherwise = findC xs
