main = do
  s <- getLine 
  putStrLn $ solve s

solve :: String -> String 
solve s = if bool1 s && bool2 s && bool3 s then "AC" else "WA"

isLower :: Char -> Bool 
isLower c = if 'a' <= c && c <= 'z' then True else False

bool1 :: String -> Bool
bool1 (x:xs) = and $ map isLower target
  where target = filter (\c -> c /= 'C') xs

bool2 :: String -> Bool
bool2 ('A':rest) = True
bool2 _ = False

bool3 :: String -> Bool
bool3 s = if (length $ filter (\c -> c == 'C') substr) == 1 then True else False
  where substr = init.tail.tail $ s
