fun main(args: Array<String>) {
    //val (n, a, b) = Triple(12, 5, 2)
    //val s = "cabbabaacaba".toCharArray()
    val (n, a, b) = readLine()!!.split(" ").map { it.toInt() }
    val s = readLine()!!.toCharArray()

    val total_ok = a + b
    var current_ok_a = 0
    var current_ok_b = 0

    s.forEachIndexed { i, person ->
        val result = when (person) {
            'a' -> {
                if ((current_ok_a + current_ok_b) < total_ok) {
                    current_ok_a++
                    true
                } else {
                    false
                }
            }
            'b' -> {
                if ((current_ok_a + current_ok_b) < total_ok && current_ok_b < b) {
                    current_ok_b++
                    true
                } else {
                    false
                }
            }
            'c' -> {
                false
            }
            else -> {
                false
            }
        }
        if (result) println("Yes") else println("No")
    }
}
