import Data.Char
import Data.List

check xs = cond1 && cond2 && cond3
    where
        cond1 = head xs == 'A'
        cond2 = (length $ filter (=='C') $ init $ drop 2 xs) == 1
        cond3 = and $ map isLower $ delete 'C' $ delete 'A' xs

main = do
    xs <- getLine
    putStrLn $
        if check xs
            then "AC"
            else "WA"