import System.IO
import Data.List
import Data.Char
import Debug.Trace

f :: String -> Bool
f s = do
  let a1 = head s == 'A'
  let b2 = findIndices ('C' ==) s
  let a2 = 1 == length b2
  let b3 = tail $ map snd $ filter (\e -> head b2 /= fst e) $ zip [0..] s
  let a3 = all isLower b3
  let a4 = all (\i -> 1 < i && i < (length s) - 2) b2
  and [a1, a2, a3, a4]

main = do
  s <- getContents
  --let s = "AtCoder"
  putStrLn $ if f s then "AC" else "WA"
  --print $ f s
