import Data.Char
import Data.List

main :: IO ()
main = getLine >>= putStrLn . solve

solve :: String -> String 
solve s
    | check s = "AC"
    | otherwise = "WA"
    where
        check ('A' : x : xs) = length ys == 1 && all isLower (last xs : x : zs)
            where
                (ys, zs) = partition ('C' ==) $ init xs
        check _ = False