import scala.math.abs

object Main extends App {
  
  val sc = new java.util.Scanner(System.in)
  val s = sc.next().toList
  val part = s.slice(2, s.length - 1)
  val cIndex = part.indexOf('C') + 2
  val map = part.groupMapReduce(identity)(_ => 1)(_ + _)
  if (s.head == 'A' && map.getOrElse('C', 0) == 1 && isLower(s)) {
    println("AC")
  } else {
    println("WA")
  }
  
  def isLower(s: List[Char]): Boolean = {
    (0 until s.length).forall{ i =>
      if (i != 0 && i != cIndex) {
        s(i).isLower
      } else {
        true
      }
    }  
  }
}