import Data.Char

match :: String -> Bool
match s = isInitialA && containsCOneAndOnly && isAllLower
  where isInitialA          = (== 'A') $ head s
        containsCOneAndOnly = (== 1) $ length . filter (== 'C') . init . drop 2 $ s
        isAllLower          = all isLower . filter (/= 'C') . tail $ s

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