fun main(args: Array<String>) {
    val (N, A, B) = readLine()!!.split(" ").map { it.toInt() }
    val list = readLine()!!.split("").filterNot { it.isEmpty() }
    val ans = solve(list, A, B)
    ans.forEach {
        println(it)
    }
}

fun solve(s: List<String>, A: Int, B: Int): List<String> {
    val availablePassing = A + B
    var nowPassingNumber = 0
    var foreignNumber = 0

    return s.map {
        if (it == "a") {
            if (nowPassingNumber < availablePassing) {
                nowPassingNumber = nowPassingNumber.plus(1)
                "Yes"
            } else {
                "No"
            }
        } else if (it == "b") {
            if (nowPassingNumber < availablePassing && foreignNumber < B) {
                nowPassingNumber = nowPassingNumber.plus(1)
                foreignNumber = foreignNumber.plus(1)
                "Yes"
            } else {
                foreignNumber = foreignNumber.plus(1)
                "No"
            }
        } else {
            "No"
        }
    }

}