import Data.List

match :: String -> Bool
match s = isInitialA && isSecondLower && isLastLower && containsCOneAndOnly && isAllLowerCaseExceptC
  where isLowerCase ch          = ('a' <= ch) && (ch <= 'z')
        (initial:second:target) = init s
        (listOfC, others)       = span (== 'C') target
        lastChar                = last s
        isInitialA              = initial == 'A'
        isSecondLower           = isLowerCase second
        isLastLower             = isLowerCase lastChar
        containsCOneAndOnly     = length listOfC == 1
        isAllLowerCaseExceptC   = all isLowerCase others

main :: IO ()
main = do
  s <- getLine
  putStrLn $ if match s then "AC" else "WA"