object Main extends App {
  val inputs: Seq[String] = scala.io.Source.stdin.getLines().toList
  val s = inputs(0)

  println(solve(s))

  def solve(s: String): String = {
    (0 until s.size).foreach { i =>
      if(i == 0) {
        if(s(i) != 'A') {
          return "WA"
        }
      } else if (i == 2) {
        if (s(i) != 'C') {
          return "WA"
        }
      } else if (s(i).isUpper) {
        return "WA"
      }
    }

    "AC"
  }
}