{-# OPTIONS_GHC -Wall #-}

import Data.Char

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

g :: String -> Bool
g s = let n = length s in 1 == (length . filter (=='C') . take (n-3) . drop 2) s

h :: String -> Bool
h s = let n = length s in (n-2) == (length . filter isLower) s

solve :: String -> Bool
solve s = f s && g s && h s

main :: IO ()
main = do
    s <- getLine

    let ans = solve s

    putStrLn $ if ans then "AC" else "WA"
