object Main {
  def main(args: Array[String]) {
    val str = scala.io.StdIn.readLine()

    var count         = 0
    var check         = true
    var large_c_count = 0
    var large_check   = false
    str.foreach { c =>
      if(count == 0) {
        if (c != 'A') {
          check = false
        }
      }

      if(1 < count && count < str.length - 1)
      {
        if(c == 'C')
        {
          large_c_count += 1
        }
      }

      count += 1
    }

    if(large_c_count != 1) check = false
    if(str.count{ c => c >= 'A' && c <= 'Z'} != 2) check = false

    if(check) println("AC")
    else      println("WA")
  }
}