import Data.Char (isUpper)
import Data.List (elemIndex)

f s = cond1 && cond2 && cond3
  where n = length s
        cond1 = s !! 0 == 'A'
        cond2 = (length . filter isUpper) s == 2
        cond3 = case elemIndex 'C' s of
                  Just i -> 2 <= i && i < n - 1
                  Nothing -> False

main = do
  s <- getLine
  putStrLn $ if f s then "AC" else "WA"