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

S = eval(input())



total = A + B

domestic = 0

overseas = 0



for i in S:

    if i == 'a':

        if domestic + overseas < total:

            print('Yes')

            domestic += 1

            continue

    elif i == 'b':

        if domestic + overseas < total and overseas < B:

            print('Yes')

            overseas += 1

            continue



    print('No')
def main():

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

    S = eval(input())



    total = A + B

    domestic = 0

    overseas = 0



    for i in S:

        if i == 'a':

            if domestic + overseas < total:

                print('Yes')

                domestic += 1

                continue

        elif i == 'b':

            if domestic + overseas < total and overseas < B:

                print('Yes')

                overseas += 1

                continue



        print('No')





if __name__ == '__main__':

    main()
N, A, B = list(map(int, input().split()))
S = eval(input())
total = A + B
domestic = 0
overseas = 0
for i in S:
    if i == "a":
        if domestic + overseas < total:
            print("Yes")
            domestic += 1
            continue
    elif i == "b":
        if domestic + overseas < total and overseas < B:
            print("Yes")
            overseas += 1
            continue
    print("No")

def main():
    N, A, B = list(map(int, input().split()))
    S = eval(input())
    total = A + B
    domestic = 0
    overseas = 0
    for i in S:
        if i == "a":
            if domestic + overseas < total:
                print("Yes")
                domestic += 1
                continue
        elif i == "b":
            if domestic + overseas < total and overseas < B:
                print("Yes")
                overseas += 1
                continue
        print("No")


if __name__ == "__main__":
    main()

-N, A, B = list(map(int, input().split())) -S = eval(input()) -total = A + B -domestic = 0 -overseas = 0 -for i in S: -    if i == "a": -        if domestic + overseas < total: -            print("Yes") -            domestic += 1 -            continue -    elif i == "b": -        if domestic + overseas < total and overseas < B: -            print("Yes") -            overseas += 1 -            continue -    print("No") +def main(): +    N, A, B = list(map(int, input().split())) +    S = eval(input()) +    total = A + B +    domestic = 0 +    overseas = 0 +    for i in S: +        if i == "a": +            if domestic + overseas < total: +                print("Yes") +                domestic += 1 +                continue +        elif i == "b": +            if domestic + overseas < total and overseas < B: +                print("Yes") +                overseas += 1 +                continue +        print("No") + + +if __name__ == "__main__": +    main()