fun main(args : Array<String>) {
  print(readLine()!!.split("").let {
    if (it[1] == "A"
      && it.subList(3, it.size - 2).count { it == "C" } == 1
      && it.count { it == it.toUpperCase() } == 4)
      "AC" else "WA"
  })
}