object Main extends App {
  val S = io.StdIn.readLine

  val c1 = S.startsWith("A")
  val c2 = (S.drop(2).dropRight(1)).count(s => s == 'C') == 1
  val c3 = S.filter(s => s != 'A' && s != 'C').mkString.matches("[a-z]+")

  val out = if (c1 && c2 && c3) "AC" else "WA"

  println(out)
}
