fun main() {
    val (n, a, b) = readLine()!!.split(" ").map(String::toInt)
    val s = readLine()!!

    var aC = 0
    var bC = 0
    for (c in s) {
        when (c) {
            'a' -> {
                if (aC + bC < a + b) {
                    aC++
                    println("Yes")
                } else {
                    println("No")
                }
            }
            'b' -> {
                if (aC + bC < a + b && bC < b) {
                    bC++
                    println("Yes")
                } else {
                    println("No")
                }
            }
            else -> {
                println("No")
            }
        }
    }
}