fun main(args: Array<String>) {
    val s = readLine()!!

    print(if (req1(s)&&req2(s)&&req3(s)) ("AC") else ("WA"))
}

fun req1(s: String): Boolean {
    return s[0] == 'A'
}

fun req2(s: String): Boolean {
    var cnt = 0
    s.substring(2 until s.length-1).forEach{ c ->
        if (c == 'C') cnt++
    }
    return (cnt == 1)
}

fun req3(s: String): Boolean {
    return s.filter{c -> (c!='A' && c!='C')}.all{c ->
        c.toInt() >= 'a'.toInt() && c.toInt() <= 'z'.toInt()
    }
}
