main = do
    s <- getLine
    putStr $ solve s

solve :: String -> String
solve a = if isAtCoder then "AC" else "WA"
    where
        isAtCoder = beginA && withOneC && notSndC && notEndC
        beginA = (==) 'A' (head a)
        withOneC =  (==) 1 (length (filter ( (==) 'C' ) (tail a) ) )
        notSndC = (/=) 'C' (head (tail a)) 
        notEndC = (/=) 'C' (last a)