fun main(args: Array<String>) {
    val s = readLine()!!
    if(s[0]=='A'){
        if(s.indexOf('C') in 2 until s.length-1){
            if((s.substring(1,s.indexOf('C'))+s.substring(s.indexOf('C')+1)).all { it.isLowerCase() }){
                println("AC")
                return
            }
        }
    }
    println("WA")
}