import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val s = sc.next()
    val countUp = s.count { it.isUpperCase() }
    if (s[0] == 'A' && countUp == 2 && s.indexOf("C") in 2..(s.length-2)) {
        println("AC")
    } else {
        println("WA")
    }
}