{-# LANGUAGE BangPatterns #-}
import Control.Monad
import Control.Applicative
import Data.List
import Data.Maybe
import Data.Bits
import qualified Data.IntMap.Strict as M
import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Unboxed as V
import Data.Vector.Unboxed ((!))

isLower :: Char -> Bool
isLower x = 'a' <= x && x <= 'z'

query :: String -> Bool
query ('A':xs) = query2 xs
query _ = False

query2 (x:xs) = isLower x && query3 xs
query2 _ = False

query3 ('C':xs) = query4 xs
query3 (x:xs) = isLower x && query3 xs
query3 _ = False

query4 [] = False
query4 xs = all isLower xs

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