Problem:
 Score : 200 points    Problem Statement 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.      Constraints  1≦N,A,B≦100000  A+B≦N  S is N characters long.  S consists only of the letters a , b and c .         Input Inputs are provided from Standard Input in the following form.  N  A  B  S       Output Output N lines. On the i -th line, output Yes if the i -th participant passed the Qualification contests or No if that participant did not pass.        Sample Input 1 10 2 3
abccabaabb      Sample Output 1 Yes
Yes
No
No
Yes
Yes
Yes
No
No
No  The first, second, fifth, sixth, and seventh participants pass the Qualification contests.       Sample Input 2 12 5 2
cabbabaacaba      Sample Output 2 No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No  The sixth participant is third among overseas students and thus does not pass the Qualification contests.       Sample Input 3 5 2 2
ccccc      Sample Output 3 No
No
No
No
No

Solution (Python):
n,a,b=map(int,input().split())
s=input()
cnt=0
foreign=0
for i in range(n):
  if s[i]=="a":
    if cnt<a+b:
      print("Yes")
      cnt+=1
    else:
      print("No")
  elif s[i]=="b":
    foreign+=1
    if cnt<a+b and foreign<=b:
      print("Yes")
      cnt+=1
    else:
      print("No")
  elif s[i]=="c":
    print("No")

Solution (Python):
def readinput():
    n,a,b=list(map(int,input().split()))
    s=input()
    return n,a,b,s

def main(n,a,b,s):
    kokunai=0
    kaigai=0
    for c in s:
        if c=='a':
            if kokunai+kaigai<a+b:
                print('Yes')
                kokunai+=1
            else:
                print('No')
        elif c=='b':
            if kokunai+kaigai<a+b and kaigai<b:
                print('Yes')
                kaigai+=1
            else:
                print('No')
        else:
            print('No')

if __name__=='__main__':
    n,a,b,s=readinput()
    main(n,a,b,s)

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

Solution (Python):
N, A, B = map(int, input().split())
S = input()

count_all = 0
count_f = 0
for i in S:
    if i == 'a':
        if count_all < A + B:
            print('Yes')
            count_all += 1
        else:
            print('No')
    elif i == 'b':
        if count_all < A + B and count_f < B:
            print('Yes')
            count_all += 1
            count_f += 1
        else:
            print('No')
    else:
        print('No')

Solution (Python):
n,a,b = map(int, input().split())
s = str(input())

counter1 = counter2 = 1
for char in s:
    if (counter1 <= (a+b)) & (char == 'a'):
        print("Yes")
        counter1 += 1
    elif (counter1 <= (a+b)) & (char == 'b') & (counter2 <= b):
        print("Yes")
        counter1 += 1
        counter2 += 1
    else:
        print("No")

Solution (Python):
def main():
    quantity, A, B = map(int, input().split())
    l = list(input())
    yes = 0
    abroad = 0

    for i in range(quantity):
        if l[i] == 'a':
            if yes < (A + B):
                print('Yes')
                yes = yes + 1
            else:
                print('No')
        
        if l[i] == 'b':
            abroad = abroad + 1
            if yes < (A + B) and abroad <= B:
                print('Yes')
                yes = yes + 1

            else:
                print('No')
        
        if l[i] == 'c':
            print('No')

main()

Solution (Python):
N, A, B = map(int, input().split())
S = input()

passed = 0
foreigners = 0

for i in range(N):
    
    if S[i] == "a":
        if passed < (A + B):
            passed += 1
            print("Yes")
        else:
            print("No")

    
    if S[i] == "b":
        foreigners += 1
        if passed < (A + B) and foreigners <= B:
            passed += 1
            print("Yes")
        else:
            print("No")

    if S[i] == "c":
        print("No")

Solution (Python):
N, A, B = map(int, input().split())
S = input()
a, b = 0, 0
for s in S:
    if s == "a":
        if a+b < A+B:
            a += 1
            print("Yes")
        else:
            print("No")
    elif s == "b":
        if a+b < A+B and b < B:
            b += 1
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Solution (Python):
N, A, B = map(int, input().split())
S = str(input())
 
total = 0
kaigai = 0
 
for i in range(0, len(S)):
    if S[i] == 'a':
        if total < A+B:
            print('Yes')
            total += 1
        else:
            print('No')
    elif S[i] == 'b':
        if total < A+B and kaigai <B:
            print('Yes')
            total += 1
            kaigai += 1
        else:
            print('No')
    else:
        print('No')

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))

n, a, b = MI()
s = input()
ok = 0
rank = 0
for si in s:
    if si == 'a':
        if ok < a+b:
            print("Yes")
            ok += 1
        else:
            print("No")
    elif si == 'b':
        rank += 1
        if ok < a+b and rank <= b:
            print("Yes")
            ok += 1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
from sys import stdin
N,A,B = [int(x) for x in stdin.readline().rstrip().split()]
S = stdin.readline().rstrip()


n=0 
n_f=0 
for i in S:
  if i == "a":
    if n < A+B:
      print("Yes")
      n+=1
    else:
      print("No")
    continue
    
  if i == "b":
    if n < A+B and n_f < B:
      print("Yes")
      n+=1
      n_f+=1
    else:
      print("No")
    continue
    
  if i =="c":
    print("No")

Solution (Python):
N, A, B = map(int, input().split())
S = str(input())

total = 0
kaigai = 0

for i in range(0, len(S)):
    if S[i] == 'a':
        if total < A+B:
            print('Yes')
            total += 1
        else:
            print('No')
    elif S[i] == 'b':
        if total < A+B and kaigai <B:
            print('Yes')
            total += 1
            kaigai += 1
        else:
            print('No')
    else:
        print('No')

Solution (Python):
n,a,b=map(int,input().split())
s=list(input())
nover=0
tot=0
for i in range(n):
    if tot<a+b:
        if s[i]=='a':
            print('Yes')
            tot+=1
        elif s[i]=='b' and nover<b:
            print('Yes')
            nover+=1
            tot+=1
        else:
            print('No')
    else:
        print('No')

Solution (Python):
N, A, B = map(int, input().split())
S = list(input())

passed = 0
foreign = 0

for i, s in enumerate(S):
    if s == "a" and passed < A + B:
        print("Yes")
        passed += 1
    elif s == "b":
        foreign += 1
        if passed < A + B and foreign <= B:
            print("Yes")
            passed += 1
        else:
            print("No")
    else:
        print("No")

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


mod = 10**9 + 7


def main():
    n, a, b = I()
    s = 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()

Solution (Python):
n,a,b = tuple(map(int,input().split()))

s = list(input())
rank = 0
brank = 0
for s_i in s:
  if s_i=='a':
    if rank==a+b:
      print("No")
      continue
    rank+=1
    print("Yes")
  elif s_i=='b':
    if rank==a+b:
      print("No")
      continue
    if brank==b:
      print("No")
      continue
    rank+=1
    brank+=1
    print("Yes")
  else:
    print("No")

Solution (Python):
def resolve():
    N, A, B = map(int, input().split())
    S = input()
    count = 1
    sabetu = 1
    for i in range(N):
        if S[i] == "a" and count <= A+B:
            count += 1
            print("Yes")
        elif S[i] == "b" and sabetu <= B and count <= A+B:
            sabetu += 1
            count += 1
            print("Yes")
        else:
            print("No")
resolve()

Solution (Python):
N,A,B=map(int,input().split())
S=input()
S=list(S)
count=0
world=1
for i in S:
    if i=="a":
        if count<A+B:
            print("Yes")
            count+=1
        else:
            print("No")
    elif i=="b":
        if (count<A+B) & (world<=B):
            print("Yes")
            count+=1
            world+=1
        else:
            print("No")
    else:
        print("No")

Solution (Python):

N,A,B = map(int,input().split())
S = input()
total = A+B
for i in range(N):
    if S[i]=='c':
        print('No')
    elif total>0:
        if S[i] == 'a':
            print('Yes')
            total = total-1
        elif S[i] =='b' and B>0:
            print('Yes')
            total = total-1
            B = B-1
        else:
            print('No')
    else:
        print('No')

Solution (Python):
n, a, b=map(int, input().split())
s=str(input())
cnt_a=0
cnt_b=0
for i in range(len(s)):
    if s[i]=='c':
        print('No')
    if s[i]=='a':
        if cnt_a+cnt_b<a+b:
            cnt_a+=1
            print('Yes')
        else:
            print('No')
    if s[i]=='b':
        if cnt_a+cnt_b<a+b and cnt_b<b:
            cnt_b+=1
            print('Yes')
        else:
            print('No')

Solution (Python):
n,a,b = map(int,input().split())
s = list(input())

yes_num = 0
gai = 0

for i in s:
    if i == "a":
        if yes_num < a + b:
            yes_num += 1
            print("Yes")
        else:
            print("No")
    
    elif i == "b":
        if yes_num < a+b and gai < b:
            yes_num += 1
            gai += 1
            print("Yes")
        else:
            print("No")
    
    elif i == "c":
        print("No")

Solution (Python):



def main():
    n, a, b = map(int,input().split())
    s = input()
    sanka = 0
    sankaigai = 0

    for hito in s:
        if hito is "c":
            print("No")
        elif hito is "a":
            if sanka < a+b:
                print("Yes")
                sanka+=1
            else:
                print("No")
        elif hito is "b":
            if sanka < a+b:
                if sankaigai < b:
                    print("Yes")
                    sanka+=1
                    sankaigai+=1
                else:
                    print("No")
            else:
                print("No")
        else:
            print("No")


if __name__ == '__main__':
    main()

Solution (Python):
N,h,u=map(int,input().split())
S = input()
kaigai=0
goukei=0
for i in range(0,N):
  if S[i]=='a' and goukei<h+u:
    print("Yes")
    goukei+=1
  elif S[i]=='b'and goukei<h+u and kaigai<u:
    print("Yes")
    goukei+=1
    kaigai+=1
  else:
    print("No")

Solution (Python):
n,a,b = map(int,input().split())
s = input()
maxa = a+b
maxb = b
counta = 0
countb = 0
for i in range(n):
  if s[i] == 'c':
    print("No")
  elif s[i] == 'b':
    if countb < maxb and counta < maxa:
      print("Yes")
      counta += 1
      countb += 1
    elif counta < maxa:
      print("No")
    else:
      print("No")
  else:
    if counta < maxa:
      print("Yes")
    else:
      print("No")
    counta+=1

Solution (Python):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N, A, B = ri_()
S = rs()
a = 0
b = 0
for i in S:
    if i == 'a':
        if a < A + B:
            print('Yes')
            a += 1
        else:
            print('No')
    elif i == 'b':
        if a < A + B and b <= B - 1:
            print('Yes')
            a += 1
        else:
            print('No')
        b += 1
    else:
        print('No')

Solution (Python):
N,A,B = [ int(i) for i in input().split() ]
S = input()

passCount = 0
overseaPassCount = 1
for k,v in enumerate(S):
  if v == "c":
    print("No")
  elif v == "b":
    if passCount<A+B and overseaPassCount<=B :
      print("Yes")
      overseaPassCount += 1
      passCount += 1
    else:
      print("No")
  elif v == "a":
    if passCount<A+B :
      print("Yes")
      passCount += 1
    else:
      print("No")

  else :
    None

Solution (Python):
def main(N, A, B ,S):
    status = [None for _ in range(N)]
    c_all, c_for = 0, 0
    for i, s in enumerate(S):
        if s == 'a' and c_all < A + B:
            c_all += 1
            status[i] = 'Yes'
        elif s == 'b' and c_all < A + B and c_for < B:
            c_all += 1
            c_for += 1
            status[i] = 'Yes'
        else:
            status[i] = 'No'
    return status


if __name__ == "__main__":
    N, A, B = map(int, input().split())
    S = input()
    ans = main(N, A, B, S)
    for i in ans:
        print(i)

Solution (Python):

def resolve():
    n, a, b = input().strip().split(' ')
    n, a, b = [int(n), int(a), int(b)]
    s = input().strip()
    a_passed = 0
    b_passed = 0
    for i in range(len(s)):
        if s[i] == 'a':
            if a_passed + b_passed < a + b:
                a_passed = a_passed + 1
                print('Yes')
            else:
                print('No')
        elif s[i] == 'b':
            if a_passed + b_passed < a + b and b_passed < b:
                b_passed = b_passed + 1
                print('Yes')
            else:
                print('No')
        else:
            print('No')
resolve()

Solution (Python):
N, A, B = [int(_) for _ in input().split()]
S = input()

ca, cb = 0, 0
for s in S:
    if s == "a":
        if ca + cb < A + B:
            print("Yes")
            ca += 1
        else:
            print("No")
    elif s == "b":
        if ca + cb < A + B and cb < B:
            print("Yes")
            cb += 1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
N, A, B = map(int, input().split())
S = input()
count = 0
count2 = 0


for i in range(N):
    if S[i] == "c":
        print("No")
    elif S[i] == "a":
        
        if count < A+B:
            print("Yes")
            count += 1
        else:
            print("No")
    elif S[i] == "b":
        
        if count < A+B and count2 < B:
            print("Yes")
            count += 1
            count2 += 1
        else:
            print("No")

Solution (Python):




from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""













if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip



"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""




def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod
 
    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)
 
def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): 
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def ceil(n, k=1): return n // k + (n % k != 0) 
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) 
def mi(): return map(int, input().split()) 
def li(): return list(map(int, input().split())) 
def lw(): return input().split() 
def lcm(a, b): return abs(a * b) // gcd(a, b) 
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) 
def dd(): return defaultdict(int) 
def ddl(): return defaultdict(list) 
def write(s): return sys.stdout.write(s)













def main():
    
    n,a,b=mi()
    s=input()
    passed=0
    passedb=0
    for i in s:
        if i=="c":
            print("No")
        elif i=="b":
            if passedb<b and passed<a+b:
                print("Yes")
                passed+=1
                passedb+=1
            else:
                print("No")
        else:
            if passed<a+b:
                print("Yes")
                passed+=1
            else:
                print("No")


















































""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""
 
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange
 
import os, sys
from io import IOBase, BytesIO
 
BUFSIZE = 8192
 
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
 
class IOWrapper(IOBase):
 
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')


 
""" main function"""
 
if __name__ == '__main__':
    main()

Solution (Python):
def resolve():
    N, A, B = [int(i) for i in input().split()]
    S = input()
    ac = 0
    abc = 0
    for s in S:
        flg = False
        if s == "a":
            if ac < A + B:
                flg = True
                ac += 1
        elif s == "b":
            if ac < A + B and abc < B:
                flg = True
                ac += 1
                abc += 1
        else:
            pass

        if flg:
            print("Yes")
        else:
            print("No")


resolve()

Solution (Python):
n,a,b = map(int,input().split())
s = list(input())
nai = 0
gai = 0

for i in s:
  if i == "c":
    print("No")
  elif i == "a":
    if nai+gai < a+b:
      print("Yes")
      nai += 1
    else:
      print("No")
  else:
    if (nai+gai < a+b) and gai < b:
      print("Yes")
      gai += 1
    else:
      print("No")

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

Solution (Python):
n,a,b=map(int,input().split())
s=input()
ab=a+b
now=0
nowb=0
for i in range(n):
    if s[i]=="a":
        if now<ab:
            print("Yes")
            now+=1
        else:
            print("No")
    elif s[i]=="b":
        nowb+=1
        if nowb<=b and now<ab:
            print("Yes")
            now+=1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
n, a, b = map(int, input().split())
s = input()
sum_ = 0
b_cnt = 0
for i in range(n):
    
    if s[i] != 'c' and sum_ < a + b:
        if s[i] == 'a':
            print('Yes')
            sum_ += 1
            continue
        elif s[i] == 'b' and b_cnt < b:
            print('Yes')
            b_cnt += 1
            sum_ += 1
            continue
    
    print('No')

Solution (Python):
N, A, B = map(int, input().split())
s = input()

x = A + B
cnt = 1
rank = 1
for i in range(N):
    y = s[i : i+1]
    if cnt <= x:
        if y == "a":
            print("Yes")
            cnt += 1
        elif y == "b" and rank <= B:
            print("Yes")
            cnt += 1
            rank += 1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
n,a,b=map(int,input().split())
s=input()

cnta=0
cntb=0

for i in range(n):
    if s[i]=="a":
        if cnta+cntb<a+b:
            print("Yes")
            cnta+=1
        else:
            print("No")
    elif s[i]=="b":
        if cntb<b and cnta+cntb<a+b:
            print("Yes")
            cntb+=1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
n,a,b=map(int,input().split())
s=input()

cnta=0
cntb=0

for i in range(n):
    if s[i]=="a":
        if cnta+cntb<a+b:
            print("Yes")
            cnta+=1
        else:
            print("No")
    elif s[i]=="b":
        if cntb<b and cnta+cntb<a+b:
            print("Yes")
            cntb+=1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
n,a,b=map(int,input().split())
s=input()
ta=0
tb=0
for i in range(n):
    if s[i]=="c":
        print("No")
    elif s[i]=="a":
        if ta+tb<a+b:
            print("Yes")
            ta+=1
        else:
            print("No")
    elif s[i]=="b":
        if ta+tb<a+b and tb<b:
            print("Yes")
            tb+=1
        else:
            print("No")

Solution (Python):
N, A, B = map(int, input().split())
L = [0, 0]
S = input()

for i in S:
    if i == "a":
        if sum(L) < A + B:
            print("Yes")
            L[0] += 1
        else:
            print("No")
    elif i == "b":
        if sum(L) < A + B and L[1] < B:
            print("Yes")
            L[1] += 1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
n,a,b=map(int,input().split())
s=input()

cnta=0
cntb=0

for i in range(n):
    if s[i]=="a":
        if cnta+cntb<a+b:
            print("Yes")
            cnta+=1
        else:
            print("No")
    elif s[i]=="b":
        if cntb<b and cnta+cntb<a+b:
            print("Yes")
            cntb+=1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N, A, B = MAP()
S = input()

cnt = 0
cnt_for = 0
for i in range(N):
	if S[i] == "a" and cnt < A+B:
		cnt += 1
		print("Yes")
	elif S[i] == "b" and cnt < A+B and cnt_for < B:
		cnt += 1
		cnt_for += 1
		print("Yes")
	else:
		print("No")

Solution (Python):
n,a,b = list(map(int,input().split()))
s = list(input())
ok = 0
rank = 1
for i in s:
    if ok >= a+b:
        print('No')
    elif i == 'a':
        print('Yes')
        ok += 1
    elif i == 'b':
        if rank <= b:
            print('Yes')
            rank += 1
            ok += 1
        else:
            print('No')
    else:
        print('No')

Solution (Python):
N,A,B = map(int,input().split())
S = input()

FOR = 1
CNT = 0
for i,s in enumerate(list(S)):
    if s=="a" and CNT < A+B:
        print("Yes")
        CNT+=1
    elif s=="b" and CNT < A+B and FOR <=B:
        print("Yes")
        CNT+=1
        FOR+=1
    else:
        print("No")

Solution (Python):
n,a,b=map(int,input().split())
ab=a+b
S=input()
allp=0
forp=0
for s in S:
  if s=='a':
    if allp<ab:
      allp+=1
      print('Yes')
    else:
      print('No')
  elif s=='b':
    if allp<ab and forp<b:
      allp+=1
      forp+=1
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Solution (Python):
N, A, B = map(int, input().split())
S = input()

x = A + B
cnt = 0
bcnt = 0
for s in S:
    if cnt >= x:
        print("No")
        continue
    if s == "a":
        cnt += 1
        print("Yes")
    elif s == "b":
        if bcnt < B:
            cnt += 1
            bcnt += 1
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





N,A,B = IL()
S = S()
countA = 0
countB = 0

for s in S:
  if s == "a":
    if countA+countB < A+B:
      countA+=1
      print("Yes")
      continue
  elif s == "b":
    if countA+countB < A+B and countB<B:
      countB+=1
      print("Yes")
      continue
  else:
    print("No")
    continue
  print("No")