{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Data.Char (isUpper)

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

solve :: String -> Bool
solve s = c1 && c2 && c3 where
  c1 = head s == 'A'
  c2 = (== 1) . length . filter (== 'C') . drop 2 $ take (length s - 1) s
  c3 = (== 2) . length $ filter isUpper s
