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

s = eval(input())

tuka = 0

br = 0

for i in range(n):

    if s[i] == 'a':

        if tuka < a+b:

            print('Yes')

            tuka += 1

        else:

            print('No')

    elif s[i] == 'b':

        if tuka < a+b and br < b:

            print('Yes')

            tuka += 1

            br += 1

        else:

            print('No')

            br += 1

    else:

        print('No')
def LI(): return list(map(int, input().split()))

def I(): return list(map(int, input().split()))





mod = 10**9 + 7





def main():

    n, a, b = I()

    s = eval(input())

    yn = []

    for i in range(n):

        if s[i] == 'a':

            if a + b > 0:

                print('Yes')

                if a > 0:

                    a -= 1

                else:

                    b -= 1

            else:

                print('No')

        elif s[i] == 'b':

            if a + b > 0 and b > 0:

                print('Yes')

            else:

                print('No')

            if b > 0:

                b -= 1

        else:

            print('No')





if __name__ == '__main__':

    main()

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

def LI():
    return list(map(int, input().split()))


def I():
    return list(map(int, input().split()))


mod = 10**9 + 7


def main():
    n, a, b = I()
    s = eval(input())
    yn = []
    for i in range(n):
        if s[i] == "a":
            if a + b > 0:
                print("Yes")
                if a > 0:
                    a -= 1
                else:
                    b -= 1
            else:
                print("No")
        elif s[i] == "b":
            if a + b > 0 and b > 0:
                print("Yes")
            else:
                print("No")
            if b > 0:
                b -= 1
        else:
            print("No")


if __name__ == "__main__":
    main()

-n, a, b = list(map(int, input().split())) -s = eval(input()) -tuka = 0 -br = 0 -for i in range(n): -    if s[i] == "a": -        if tuka < a + b: -            print("Yes") -            tuka += 1 +def LI(): +    return list(map(int, input().split())) + + +def I(): +    return list(map(int, input().split())) + + +mod = 10**9 + 7 + + +def main(): +    n, a, b = I() +    s = eval(input()) +    yn = [] +    for i in range(n): +        if s[i] == "a": +            if a + b > 0: +                print("Yes") +                if a > 0: +                    a -= 1 +                else: +                    b -= 1 +            else: +                print("No") +        elif s[i] == "b": +            if a + b > 0 and b > 0: +                print("Yes") +            else: +                print("No") +            if b > 0: +                b -= 1 -    elif s[i] == "b": -        if tuka < a + b and br < b: -            print("Yes") -            tuka += 1 -            br += 1 -        else: -            print("No") -            br += 1 -    else: -        print("No") + + +if __name__ == "__main__": +    main()