let to_char str =
  let len = String.length str in
  let rec inner i acc =
    match i > 0 with
    | false -> 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 countlower str =
  List.length (List.filter is_lower (to_char str))

let () =
  let s = read_line() in
  print_endline @@
  let inner () =
    match s.[0] = 'A' with
    | false -> false
    | true ->
      (match String.rindex_opt s 'C' with
       | None -> false
       | Some n ->
         (match 2 <= n && n < (String.length s) - 2 with
          | false -> false
          | true -> match (String.length s) - (countlower s) with
            | 2 -> true
            | _ -> false))
  in match inner () with
  | true -> "AC"
  | false -> "WA"