import Data.Char
import Data.List

main :: IO ()
main = do
  s <- getLine
  let c1 = (=='A') . head
  let c2 = (==1) . length . filter (=='C') . tail . tail . init
  let c3 = all isLower . drop 2 . sort
  putStrLn $ if c1 s && c2 s && c3 s then "AC" else "WA"