import java.util.Scanner

object Main {
  val sc = new Scanner(System.in)
  def main(args: Array[String]): Unit = taskB

  def taskA(): Unit = {
    val r = sc.nextInt
    println(if (r < 1200) "ABC" else if (r < 2800) "ARC" else "AGC")
  }

  def taskB(): Unit = {
    val s = sc.next
    if (s.filter(_.isUpper) == "AC" && s(0) == 'A' && s(1) != 'C' && s(s.length - 1).isLower) {
      println("AC")
    } else {
      println("WA")
    }
  }
}
