import Debug.Trace
import Data.Char

check0 :: String -> Bool
check0 [] = False
check0 (h:_) = h == 'A' 

check1 :: String -> Bool
check1 s = 
    let (_, mm) = splitAt 2 s in
    let (m, _) = splitAt (length mm - 1)  mm in
    let num = length $ filter ('C' ==) m in
    num == 1

check2 :: String -> Bool
check2 s = 
    let (ll, mm) = splitAt 2 s in
    let (m, r) = splitAt (length mm - 1)  mm in
    let (_, l) = splitAt 1 ll in
    and (map isLower l) && and (map isLower r) && and (map (\x -> isLower x || x == 'C') m)

solve :: String -> String
solve s
    |  check0 s && check1 s && check2 s  = "AC"
    | otherwise = "WA"

main :: IO ()
main = do
    s <- getLine
    putStrLn $ solve s