fun main(args: Array<String>) {
    val s= readLine()!!
    val b =
            s.first()=='A' &&
            s.drop(2).dropLast(1).count{ it=='C' }==1 &&
            s.count{ it.isUpperCase() }==2
    println(if(b) "AC" else "WA")
}