import Data.Char
f y = (g 0 y == 1)
  where
    g n [] = n
    g n ('C':xs) = g (n+1) xs
    g n (x:xs) = if isLower x then g n xs else 100
main = do
  (x:x1:xss) <- getLine
  let xs = init xss; y = last xss
  print $ if x == 'A' && isLower y && isLower x1 && f xs then "AC" else "WA"
