let () =
  let s = read_line () in
  print_endline @@
  if
    s.[0] = 'A' &&
    1 = List.length (List.filter (( = ) 'C') @@ Array.to_list @@ Array.init (String.length s - 3) @@ fun i -> s.[i + 2]) &&
    2 = List.length (List.filter (fun c -> Char.code 'A' <= Char.code c && Char.code c <= Char.code 'Z') @@ Array.to_list @@ Array.init (String.length s) @@ fun i -> s.[i])
  then "AC"
  else "WA"