import Control.Applicative ((<$>))
import Data.List (elemIndices, delete)
import Data.Bool (bool)
import Data.Char (isLower)

main :: IO ()
main = solve <$> getLine >>= putStrLn

solve :: String -> String
solve s = bool "WA" "AC" $ head s == 'A' && ((== 1) . length . elemIndices 'C' . init . drop 2) s && all isLower (delete 'A' (delete 'C' s))
