

N,A,B = list(map(int,input().split()))



S = list(eval(input()))

counter = 0

oversea= 1

for i,s in enumerate(S):

    if(s == 'a'):

        if(counter < (A + B)):

            print("Yes")

            counter+=1

        else:

            print("No")

    elif(s == 'b'):

        if(counter < (A + B) and  oversea <= B):

            print("Yes")

            counter+=1

            oversea +=1

        else:

            print("No")

    else:

        print("No")
def myAnswer(A: int, B: int, S: list) -> None:

    counter = 0

    foreignStu = 1

    for i, s in enumerate(S):

        if(s == 'a' and counter < (A + B)): #国内の学生で、カウンタの値が(A+B)未満なら通過

            print("Yes")

            counter += 1#カウンタの値を更新

        elif(s == 'b' and counter < (A + B) and foreignStu <= B): #海外の学生で、カウンタの値が(A+B)未満かつ海外学生の順位がB以下なら通過

            print("Yes")

            counter += 1

            foreignStu += 1

        else:

            print("No")





def main():

    N, A, B = list(map(int, input().split()))

    S = list(eval(input()))

    myAnswer(A, B, S)





if __name__ == "__main__":

    main()
N, A, B = list(map(int, input().split()))
S = list(eval(input()))
counter = 0
oversea = 1
for i, s in enumerate(S):
    if s == "a":
        if counter < (A + B):
            print("Yes")
            counter += 1
        else:
            print("No")
    elif s == "b":
        if counter < (A + B) and oversea <= B:
            print("Yes")
            counter += 1
            oversea += 1
        else:
            print("No")
    else:
        print("No")

def myAnswer(A: int, B: int, S: list) -> None:
    counter = 0
    foreignStu = 1
    for i, s in enumerate(S):
        if s == "a" and counter < (A + B):  # 国内の学生で、カウンタの値が(A+B)未満なら通過
            print("Yes")
            counter += 1  # カウンタの値を更新
        elif (
            s == "b" and counter < (A + B) and foreignStu <= B
        ):  # 海外の学生で、カウンタの値が(A+B)未満かつ海外学生の順位がB以下なら通過
            print("Yes")
            counter += 1
            foreignStu += 1
        else:
            print("No")


def main():
    N, A, B = list(map(int, input().split()))
    S = list(eval(input()))
    myAnswer(A, B, S)


if __name__ == "__main__":
    main()

-N, A, B = list(map(int, input().split())) -S = list(eval(input())) -counter = 0 -oversea = 1 -for i, s in enumerate(S): -    if s == "a": -        if counter < (A + B): +def myAnswer(A: int, B: int, S: list) -> None: +    counter = 0 +    foreignStu = 1 +    for i, s in enumerate(S): +        if s == "a" and counter < (A + B):  # 国内の学生で、カウンタの値が(A+B)未満なら通過 +            print("Yes") +            counter += 1  # カウンタの値を更新 +        elif ( +            s == "b" and counter < (A + B) and foreignStu <= B +        ):  # 海外の学生で、カウンタの値が(A+B)未満かつ海外学生の順位がB以下なら通過 +            foreignStu += 1 -    elif s == "b": -        if counter < (A + B) and oversea <= B: -            print("Yes") -            counter += 1 -            oversea += 1 -        else: -            print("No") -    else: -        print("No") + + +def main(): +    N, A, B = list(map(int, input().split())) +    S = list(eval(input())) +    myAnswer(A, B, S) + + +if __name__ == "__main__": +    main()