import Data.List

main = do  
  s <- getLine
  putStrLn $ if solve s then "AC" else "WA"

  where
    solve s = or $ map (\i -> solve' i s) [3..length s-1]
    solve' i s = (s !! 0 == 'A') && (s !! (i-1) == 'C') && (and [elem c ['a'..'z'] | (j,c)<-(zip [1..] s), j/=1, j/=i])
