object Main extends App {
	val s = scala.io.StdIn.readLine.toList.toArray
	val size = s.size

	if(s(0) == 'A'){
		var cnt = 0
		for(i<-2 until size-1){
			if(s(i) == 'C') cnt += 1
		}

		if(cnt == 1) println("AC")
		else println("WA")
	}else{
		println("WA")
	}
}