import Data.List
import Data.Char

headA :: String -> Bool
headA s = head s == 'A'

existC :: String -> Bool
existC s = elem 'C' (midiam s)
        where
          midiam x = drop 1 (reverse (drop 2 x ))

smallalfabet :: String -> Bool
smallalfabet s = length [x | x <- s, elem x ['A'..'Z']] == 2

main :: IO ()
main = do
  s <- getLine
  putStrLn $ if (headA s && existC s && smallalfabet s)
    then "AC"
    else "WA"
