fun main(arr:Array<String>) {
    println(if(isValid(readLine()!!)) "AC" else "WA")
}

fun isValid(s:String):Boolean {
    if(!s.startsWith("A")) {
        return false
    }
    val tmp = s.substring(2, s.length-1)
    if(tmp.count{it == 'C'} != 1) {
        return false
    }
    return s.filter { it >= 'a' && it <= 'z' }.count() == s.length - 2
}