import           Data.Char

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

judge :: String -> Bool
judge s =
    let t = drop 2 (take (length s - 1) s)
    in  head s == 'A' && 'C' `elem` t && length (filter isUpper s) == 2
