let to_char str =
  let len = String.length str in
  let rec inner i acc =
    match i > 0 with
    | false -> str.[0] :: acc
    | true -> inner (i - 1) (str.[i] :: acc)
  in inner (len - 1) []

let is_lower c =
  Char.compare 'a' c <= 0 && Char.compare c 'z' <= 0

let count_lower str =
  List.length (List.filter is_lower (to_char str))

let () =
  let s = read_line() in
  print_endline @@
  let ch = to_char s in
  let ch2 = List.tl (List.tl ch) in
  match (List.hd ch = 'A' &&
         List.mem 'C' ch2 &&
         not (List.nth ch2 (List.length ch2 - 1) = 'C') &&
         (String.length s) - (count_lower s) = 2) with
  | true -> "AC"
  | false -> "WA"