import Control.Monad
import Data.Char

main = do
    s <- getLine
    putStrLn $ solve s 0 True

solve :: String -> Int -> Bool -> String
solve ""        i True          = "AC"
solve ""        i False         = "WA"
solve ('A': st) 0 c             = solve st 1 c
solve ( _ : st) 0 c             = "WA"
solve ('C': st) i c | i >= 2 && st /= "" && c = solve st (succ i) False
                    | otherwise = "WA"
solve ( s : st) i c | isLower s = solve st (succ i) c
                    | otherwise = "WA"
