import Data.Char

solve1 :: String -> Bool
solve1 (s : sx)
  | s == 'A' = (solve2 sx)
  | otherwise = False

solve2 :: String -> Bool
solve2 (s : sx)
  | s == (toLower s) = solve3 sx False
  | otherwise = False

solve3 :: String -> Bool -> Bool
solve3 [] b
  | b = True
  | otherwise = False
solve3 (s : sx) b
  | s == 'C' && (b == True || (length sx) <= 1) = False
  | s == 'C' = solve3 sx True
  | s /= (toLower s) = False
  | otherwise = solve3 sx b

main = do
  s <- getLine
  if (solve1 s)
  then putStrLn "AC"
  else putStrLn "WA"
  