import Data.List
main = do
  s <- getLine :: IO String
  putStrLn $ if f s then "AC" else "WA" 
  

f :: String -> Bool
f s
  | head s /= 'A' = False
  | (length $ elemIndices 'C' s) /= 1 = False
  | last s == 'C' = False
  | otherwise =
      all (&&True) $ map (`elem` ['a'..'z']) $ delete 'A' $ delete 'C' s