import Data.Char

main :: IO ()
main = do
  s <- getString
  putStrLn $ if and [p s, q s, r s] then "AC" else "WA"
  where
    p s = head s == 'A'
    q s = any (== 'C') . init . tail . tail $ s
    r s = countIf isLower s + 2== length s

getString :: IO String
getString = getLine

countIf :: (a -> Bool) -> [a] -> Int
countIf f = length . filter f
