fun main(args: Array<String>) {
    val s = readLine()!!
    var ccnt = 0
    var x = false
    for ((i, c) in s.withIndex()) {
        x = when (i) {
            0 -> c == 'A'
            in 2..s.length - 2 -> if (c == 'C') ccnt++ == 0 else Character.isLowerCase(c)
            else -> Character.isLowerCase(c)
        }
        if (!x) break
    }
    println(if (x && ccnt == 1) "AC" else "WA")
}
