def resolve():

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

    S = eval(input())

    Atmp = 0

    Btmp = 0

    for i in S:

        if i == 'a':

            if Atmp + Btmp < A+B:

                Atmp += 1

                print('Yes')

            else:

                print('No')

        elif i == 'b':

            if Btmp < B and Atmp + Btmp < A+B:

                Btmp += 1

                print('Yes')

            else:

                print('No')

        else:

            print('No')

resolve()

def resolve():

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

    S = eval(input())

    Atmp = 0

    Btmp = 0

    ans = []

    my_append = ans.append

    for i in S:

        if i == 'a':

            if Atmp + Btmp < A+B:

                Atmp += 1

                my_append('Yes')

            else:

                my_append('No')

        elif i == 'b':

            if Btmp < B and Atmp + Btmp < A+B:

                Btmp += 1

                my_append('Yes')

            else:

                my_append('No')

        else:

            my_append('No')

    print(("\n".join(ans)))

resolve()
def resolve():
    N, A, B = list(map(int, input().split()))
    S = eval(input())
    Atmp = 0
    Btmp = 0
    for i in S:
        if i == "a":
            if Atmp + Btmp < A + B:
                Atmp += 1
                print("Yes")
            else:
                print("No")
        elif i == "b":
            if Btmp < B and Atmp + Btmp < A + B:
                Btmp += 1
                print("Yes")
            else:
                print("No")
        else:
            print("No")


resolve()

def resolve():
    N, A, B = list(map(int, input().split()))
    S = eval(input())
    Atmp = 0
    Btmp = 0
    ans = []
    my_append = ans.append
    for i in S:
        if i == "a":
            if Atmp + Btmp < A + B:
                Atmp += 1
                my_append("Yes")
            else:
                my_append("No")
        elif i == "b":
            if Btmp < B and Atmp + Btmp < A + B:
                Btmp += 1
                my_append("Yes")
            else:
                my_append("No")
        else:
            my_append("No")
    print(("\n".join(ans)))


resolve()

+    ans = [] +    my_append = ans.append -                print("Yes") +                my_append("Yes") -                print("No") +                my_append("No") -                print("Yes") +                my_append("Yes") -                print("No") +                my_append("No") -            print("No") +            my_append("No") +    print(("\n".join(ans)))