import Data.Attoparsec.ByteString.Char8
import qualified Data.ByteString.Char8 as BS
import Data.Char
import Control.Applicative

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

solve :: BS.ByteString -> String
solve bs = case parseOnly acParser bs of
  Left _ -> "WA"
  Right ('A', 'C') -> "AC"

acParser :: Parser (Char, Char)
acParser = (,)
  <$> char 'A'
  <* many1 lower
  <*> char 'C'
  <* many1 lower
  <* endOfLine

lower :: Parser Char
lower = satisfy isLower
