open Batteries
open Printf
let () =
  let s = Scanf.scanf "%s " (fun a -> a) in
  let s1 = String.slice ~last:1 s in
  let s2 = String.slice ~first:2 ~last:(String.length s - 1) s in

  Printf.printf "%s\n" @@
  if s1 = "A" && (
      let l = List.of_enum (
          String.find_all s2 "C"
        )
      in
      List.length l = 1
    ) && (
       String.length (String.filter Char.is_lowercase s) = (String.length s) - 2
    )
  then "AC" else "WA"
