import scala.io.StdIn._
object Main{
  def main(args: Array[String]): Unit ={
    val s = readLine
    val s1 = s.substring(2,s.length-3)
    val b1 = s.startsWith("A")
    val b2 = s1.matches("[^C]*C[^C]*")
    val index = s1.indexOf("C") + 2 
    val s2 = new StringBuilder(s.substring(1)).replace(index - 1 ,index  ,"").toString
    val b3 = s2.toLowerCase() == s2
    if(b1&&b2&&b3)
      println("AC")
    else
      println("WA")
  }
}
