import           Data.Char

main :: IO ()
main = do
    s <- getLine :: IO String
    putStrLn $ if judge s then "AC" else "WA"

judge :: String -> Bool
judge s = ahead s && celem s && small s

ahead :: String -> Bool
ahead s = head s == 'A'

celem :: String -> Bool
celem s =
    let n  = length s
        si = drop 2 (take (n - 1) s)
    in  'C' `elem` si

small :: String -> Bool
small s = length (filter isUpper s) == 2
