f2::Char->Bool
f2 a=('a'<=a) && (a<='z')

f::String->String
f (x:y:xs)
   |not (x=='A')="WA"
   |head (reverse xs)=='C'="WA"
   |notElem 'C' xs="WA"
   |otherwise=if length (filter f2 (y:xs))==(length (y:xs))-1 then "AC" else "WA" 

main = do
       a<-getLine
       putStrLn $ f a