import scala.io.StdIn

object Main extends App {
  val s = Array(StdIn.readLine)

  val res = s
    .filter(_.charAt(0) == 'A')
    .filter(_.count(_.isUpper) == 2)
    .map(l => l.substring(2, l.length-1))
    .exists(a => a.count(_ == 'C') == 1)

  println(if (res) "AC" else "WA")
}
