import Data.Attoparsec.ByteString.Char8
import qualified Data.ByteString.Char8 as BS
import Data.Char (isLower)

main :: IO ()
main = do
  s <- BS.getLine
  putStrLn $ solve s

solve :: BS.ByteString -> String
solve s = case parseOnly acParser s of
  Left _ -> "WA"
  Right () -> "AC"

acParser :: Parser ()
acParser =
  <* char 'A'
  <* many1 lower
  <* char 'C'
  <* many1 lower
  <* endOfInput
  where lower = satisfy isLower
