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

S = eval(input())



a_counter = 0

b_counter = 0



for i in range(N):

  s = S[0]

  if s == "a" and a_counter + b_counter <A+B:

    a_counter += 1

    print("Yes")

  elif s == "b" and b_counter < B and a_counter + b_counter <A+B:

    b_counter += 1

    print("Yes")

  else:

    print("No")

  

  S = S[1:]
#!/usr/bin/env python3



# from numba import njit



# from collections import Counter

# from itertools import accumulate

# import numpy as np

# from heapq import heappop,heappush

# from bisect import bisect_left



# @njit

def solve(n,a,b,s):

  ans = [""]*n

  japaneseStudents = 0

  foreignStudents = 0

  for i in range(n):

    if s[i] == "a" and japaneseStudents + foreignStudents < a+b:

      ans[i] = "Yes"

      japaneseStudents += 1

    elif s[i] == "b" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:

      ans[i] = "Yes"

      foreignStudents += 1

    else:

      ans[i] = "No"

  return ans







def main():

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

  s = eval(input())

  ans = solve(N,A,B,s)

  for i in range(N):

    print((ans[i]))

  return



if __name__ == '__main__':

  main()

N, A, B = list(map(int, input().split()))
S = eval(input())
a_counter = 0
b_counter = 0
for i in range(N):
    s = S[0]
    if s == "a" and a_counter + b_counter < A + B:
        a_counter += 1
        print("Yes")
    elif s == "b" and b_counter < B and a_counter + b_counter < A + B:
        b_counter += 1
        print("Yes")
    else:
        print("No")
    S = S[1:]

#!/usr/bin/env python3
# from numba import njit
# from collections import Counter
# from itertools import accumulate
# import numpy as np
# from heapq import heappop,heappush
# from bisect import bisect_left
# @njit
def solve(n, a, b, s):
    ans = [""] * n
    japaneseStudents = 0
    foreignStudents = 0
    for i in range(n):
        if s[i] == "a" and japaneseStudents + foreignStudents < a + b:
            ans[i] = "Yes"
            japaneseStudents += 1
        elif (
            s[i] == "b"
            and japaneseStudents + foreignStudents < a + b
            and foreignStudents < b
        ):
            ans[i] = "Yes"
            foreignStudents += 1
        else:
            ans[i] = "No"
    return ans


def main():
    N, A, B = list(map(int, input().split()))
    s = eval(input())
    ans = solve(N, A, B, s)
    for i in range(N):
        print((ans[i]))
    return


if __name__ == "__main__":
    main()

-N, A, B = list(map(int, input().split())) -S = eval(input()) -a_counter = 0 -b_counter = 0 -for i in range(N): -    s = S[0] -    if s == "a" and a_counter + b_counter < A + B: -        a_counter += 1 -        print("Yes") -    elif s == "b" and b_counter < B and a_counter + b_counter < A + B: -        b_counter += 1 -        print("Yes") -    else: -        print("No") -    S = S[1:] +#!/usr/bin/env python3 +# from numba import njit +# from collections import Counter +# from itertools import accumulate +# import numpy as np +# from heapq import heappop,heappush +# from bisect import bisect_left +# @njit +def solve(n, a, b, s): +    ans = [""] * n +    japaneseStudents = 0 +    foreignStudents = 0 +    for i in range(n): +        if s[i] == "a" and japaneseStudents + foreignStudents < a + b: +            ans[i] = "Yes" +            japaneseStudents += 1 +        elif ( +            s[i] == "b" +            and japaneseStudents + foreignStudents < a + b +            and foreignStudents < b +        ): +            ans[i] = "Yes" +            foreignStudents += 1 +        else: +            ans[i] = "No" +    return ans + + +def main(): +    N, A, B = list(map(int, input().split())) +    s = eval(input()) +    ans = solve(N, A, B, s) +    for i in range(N): +        print((ans[i])) +    return + + +if __name__ == "__main__": +    main()