let string_of_list s =
  let rec exp i l =
    if i < 0 then l else exp (i - 1) (s.[i] :: l) in
  exp (String.length s - 1) []
let string_of_char c = String.make 1 c
let () =
  Scanf.scanf "%s\n"
    (fun s ->
       let lst = string_of_list s in
       let arr = Array.of_list lst in
       let headChar = arr.(0) in
       let sublst = Array.to_list (Array.sub arr 2 ((Array.length arr) - 3)) in
       let exist1C =((List.length sublst) - (List.length (List.filter (fun s -> s <> 'C') sublst))) = 1 in
       if headChar = 'A' && exist1C then
         let o = List.map (string_of_char)
             (List.filter (fun s -> s <> 'A' && s <> 'C') lst) in
         let original = List.fold_left (^) "" o in
         let want = String.lowercase_ascii original in
         if original = want && (List.length o = (List.length lst - 2)) then "AC"
         else "WA"
       else "WA"
    ) |> print_string