def main():

    N, A, B = (int(i) for i in input().split())

    S = eval(input())

    b_cnt = 0

    cnt = 0

    for s in S:

        if s == 'a' and cnt < A + B:

            print("Yes")

            cnt += 1

        elif s == 'b' and cnt < A + B and b_cnt < B:

            print("Yes")

            cnt += 1

            b_cnt += 1

        else:

            print("No")





if __name__ == '__main__':

    main()

def main():

    N, A, B = (int(i) for i in input().split())

    S = eval(input())

    cnt = 0

    cnt_ob = 0

    for s in S:

        if s == "a":

            if cnt < A+B:

                print("Yes")

                cnt += 1

            else:

                print("No")

        elif s == "b":

            if cnt < A+B and cnt_ob < B:

                print("Yes")

                cnt += 1

                cnt_ob += 1

            else:

                print("No")

        else:

            print("No")





if __name__ == '__main__':

    main()

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


if __name__ == "__main__":
    main()

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


if __name__ == "__main__":
    main()

-    b_cnt = 0 +    cnt_ob = 0 -        if s == "a" and cnt < A + B: -            print("Yes") -            cnt += 1 -        elif s == "b" and cnt < A + B and b_cnt < B: -            print("Yes") -            cnt += 1 -            b_cnt += 1 +        if s == "a": +            if cnt < A + B: +                print("Yes") +                cnt += 1 +            else: +                print("No") +        elif s == "b": +            if cnt < A + B and cnt_ob < B: +                print("Yes") +                cnt += 1 +                cnt_ob += 1 +            else: +                print("No")