{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}

import Control.Applicative
import Control.Monad
import Control.Arrow
import Data.List
import Data.Maybe
import Data.Char
import qualified Data.ByteString.Char8 as B
import Text.Printf

readInt = ( readLn :: IO Int )
readInts = map ( read :: String -> Int ) . words <$> getLine

getList = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine

which a b f = if f then a else b
mp [ a, b ] = ( a, b )

main = getLine >>= putStrLn . which "AC" "WA" . and . ( <*> ) [ f1, f2, f3 ] . pure

f1 = ( == 'A' ) . head
f2 = ( == 1 ) . length . filter ( == 'C' ) . drop 2 . reverse . drop 1 . reverse
f3 = ( == 2 ) . length . filter isUpper