import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  s <- getLine
  let isTrue = and $ map ($s) [check1,check2,check3]
  putStrLn $ if isTrue then "AC" else "WA"

check1 s = head s=='A'
check2 s = elem 'C' $ drop 2 $ init s
check3 s = and $ elemList (s\\"AC") ['a'..'z']

elemList [] _ = []
elemList (x:xs) list  = elem x list : elemList xs list