import System.IO
import Data.List
import Data.Char

f :: String -> Bool
f s = do
  let a1 = head s == 'A'
  let a2 = (1 ==) $ length $ filter ('C' ==) $ reverse $ drop 1 $ reverse $ drop 2 s
  let a3 = all isLower $ filter (\c -> c /= 'A' && c /= 'C') s
  and [a1, a2, a3]

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