module Main where

import Control.Applicative
import Control.Monad
import Data.Char

c1 xs = head xs == 'A'

c2 xs = let ys = init $ drop 2 xs
        in filter (== 'C') ys == ['C']

c3 xs = all (isLower) $ filter (`notElem` "AC") xs

main :: IO ()
main = do
    ss <- getLine
    if and [c1 ss, c2 ss, c3 ss]
        then putStrLn "AC"
        else putStrLn "WA"