def resolve():

    n,a,b=list(map(int, input().split()))

    s=list(eval(input()))

    cnt=0

    cnt_b=0

    for i in range(n):

        if s[i]=='c':

            print('No')

        elif s[i]=='a':

            if cnt<a+b:

                print('Yes')

                cnt+=1

            else:

                print('No')

        else:

            if cnt<a+b and cnt_b<b:

                print('Yes')

                cnt+=1

                cnt_b+=1

            else:

                print('No')

resolve()
def resolve():

    n,a,b=list(map(int, input().split()))

    s=list(eval(input()))

    cnt=0

    cnt_b=0

    for i in range(n):

        if s[i]=='b' and cnt<a+b and cnt_b<b:

            print('Yes')

            cnt+=1

            cnt_b+=1

        elif s[i]=='a' and cnt<a+b:

            print('Yes')

            cnt+=1

        else:

            print('No')

resolve()
def resolve():
    n, a, b = list(map(int, input().split()))
    s = list(eval(input()))
    cnt = 0
    cnt_b = 0
    for i in range(n):
        if s[i] == "c":
            print("No")
        elif s[i] == "a":
            if cnt < a + b:
                print("Yes")
                cnt += 1
            else:
                print("No")
        else:
            if cnt < a + b and cnt_b < b:
                print("Yes")
                cnt += 1
                cnt_b += 1
            else:
                print("No")


resolve()

def resolve():
    n, a, b = list(map(int, input().split()))
    s = list(eval(input()))
    cnt = 0
    cnt_b = 0
    for i in range(n):
        if s[i] == "b" and cnt < a + b and cnt_b < b:
            print("Yes")
            cnt += 1
            cnt_b += 1
        elif s[i] == "a" and cnt < a + b:
            print("Yes")
            cnt += 1
        else:
            print("No")


resolve()

-        if s[i] == "c": +        if s[i] == "b" and cnt < a + b and cnt_b < b: +            print("Yes") +            cnt += 1 +            cnt_b += 1 +        elif s[i] == "a" and cnt < a + b: +            print("Yes") +            cnt += 1 +        else: -        elif s[i] == "a": -            if cnt < a + b: -                print("Yes") -                cnt += 1 -            else: -                print("No") -        else: -            if cnt < a + b and cnt_b < b: -                print("Yes") -                cnt += 1 -                cnt_b += 1 -            else: -                print("No")