main = do
    s <- getLine
    putStr $ solve s

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