import Data.Char
import Data.List

main=do
    (sa:sd)<-getLine
    putStrLn $ if and [e1 sa, e2 sd] then "AC" else "WA"
    where
        e1 sa = sa == 'A'
        ic sd = findIndex (=='C') sd
        e2 sd = case ic sd of
            Nothing -> False
            Just (i) | i>0 && i<(length sd)-1 -> e3 $ delete (sd !! i) sd
            otherwise -> False
            where i = ic sd
        e3 sr = all (isLower) sr