import java.util.*

val sc = Scanner(System.`in`)
var S: String = sc.next()

fun main(args: Array<String>) {
    println(if (judge(S)) "AC" else "WA")
}

fun judge(s: String): Boolean {
    if (s[0] != 'A') {
        return false
    }
    var flg = false
    for (i in 1 until s.length) {
        if (s[i].isUpperCase()) {
            if (s[i] != 'C' || i == 1 || i == s.length - 1 || flg) {
                return false
            }
            flg = true
        }
    }
    if (!flg) {
        return false
    }
    return true
}
