import Data.Char

solver::String->Bool
solver str = let a:b:rest = str in
             let restrv = reverse rest in
             let l:rest2 = restrv in
             let notC = filter ('C'/=) rest2 in
             let isC  = filter ('C'==) rest2 in
             (a=='A')&&(isLower b)&&(isLower l)&&(length isC ==1)&&(and (map isLower notC))

main::IO()
main=do
  str<-getLine
  putStr (if solver str then "AC\n" else "WA\n") 