import scala.io.StdIn._
object Main{
  def main(args: Array[String]): Unit ={
    val s = readLine
    val b = s.matches("A.[^C]*C[^C]*.")
    val b2 = s.count(_.isUpper) == 2
    if(b&&b2)
      println("AC")
    else
      println("WA")
  }
}
