import Control.Monad
import Data.List
import Data.Maybe
import qualified Data.ByteString.Char8 as B
import Data.Char

main :: IO ()
main = do
    s <- getLine :: IO String
    putStrLn $ if head s == 'A'
        && 1 == length (filter (=='C') (drop 1 (reverse (drop 2 s)))) 
        && all isLower (filter (/='C') (drop 1 (reverse (drop 2 s))))
        then "AC"
        else "WA"