import Data.Char

main = interact $ pureMain

pureMain :: String -> String
pureMain s = if f $ head $ lines $ s then "AC\n" else "WA\n"

f :: String -> Bool
f s = head s == 'A' && length (filter (== 'C') $ init $ drop 2 s) == 1 && length (filter isUpper s) == 2