import Control.Applicative
import Control.Monad
import Data.Char


main = do
    s <- getLine
    putStrLn $ ans s

ans :: String -> String
ans s = if (s !! 0) == 'A' && (length $ filter (== 'C') (reverse . drop 1 . reverse $ drop 2 s)) == 1 && all (\c -> c == 'A' || c == 'C' || isLower c) s then "AC" else "WA"
