object Main extends App {
	val s = scala.io.StdIn.readLine.toList.toArray
	val size = s.size
 
	val A = Array('B', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z')

	if(s(0) == 'A'){
		var flag = false
		var cnt  = 0

		if(A.contains(s(1))) flag = true
		if(A.contains(s(size-1))) flag = true

		for(i<-2 to size-2){
			if(s(i) == 'C') cnt += 1
			if(A.contains(s(i))) flag = true
		}

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