There are N participants in the CODE FESTIVAL 2016 Qualification contests. The participants are either students in Japan, students from overseas, or neither of these.  Only Japanese students or overseas students can pass the Qualification contests. The students pass when they satisfy the conditions listed below, from the top rank down. Participants who are not students cannot pass the Qualification contests.    * A Japanese student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B.   * An overseas student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B and the student ranks B-th or above among all overseas students.  A string S is assigned indicating attributes of all participants. If the i-th character of string S is `a`, this means the participant ranked i-th in the Qualification contests is a Japanese student; `b` means the participant ranked i-th is an overseas student; and `c` means the participant ranked i-th is neither of these.  Write a program that outputs for all the participants in descending rank either `Yes` if they passed the Qualification contests or `No` if they did not pass.
N, A, B = map(int,input().split())
S = 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


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 = map(int,input().split())
  s = input()
  ans = solve(N,A,B,s)
  for i in range(N):
    print(ans[i])
  return

if __name__ == '__main__':
  main()
