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=[]
s_in = input()
for i in range(n):
    s.append(s_in[i])
pass_all = 0
pass_kaigai = 0
judge=[]
for i in range(n):
    if s[i] == "a":
        if pass_all < a + b:
            judge.append("Yes")
            pass_all += 1
        else:
            judge.append("No")
    elif s[i] == "b":
        if pass_all < a+b and pass_kaigai < b:
            judge.append("Yes")
            pass_all += 1
            pass_kaigai += 1
        else:
            judge.append("No")
    else:
        judge.append("No")
for i in range(n):
    print(judge[i])

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

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

Solution (Python):
x = list(map(int, input().split()))
n = x[0]
a = x[1]
b = x[2]
s = input()


count_domestic = 0
count_oversea = 0
judge_list = []
yes = 'Yes'
no = 'No'

for i in range(n):
    candidate = s[i]
    if candidate == 'a':
        if count_domestic + count_oversea < a + b:
            judge_list.append(yes)
            count_domestic += 1
        else:
            judge_list.append(no)
    elif candidate == 'b':
        if count_domestic + count_oversea < a + b and count_oversea < b:
            judge_list.append(yes)
            count_oversea += 1
        else:
            judge_list.append(no)
    else:
        judge_list.append(no)

for j in range(len(judge_list)):
    print(judge_list[j])

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

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

Solution (Python):
n,A,B = map(int, input().split())
s = input()
a_count = 0
b_count = 0
for i in s:
  if i == 'a':
    if a_count + b_count < A + B:
      print('Yes')
      a_count += 1
    else:
      print('No')
  elif i == 'b':
    if a_count + b_count < A + B and b_count < B:
      print('Yes')
      b_count += 1
    else:
      print('No')
  else:
    print('No')

Solution (Python):
"""Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py"""
N, A, B = map(int, input().split())
S = str(input())

RANK_a = 0
RANK_b = 0

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

        if RANK_a+RANK_b < A+B:
            if RANK_b < B:
                RANK_b += 1
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        
        print("No")

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

rank = 0
foreign_rank = 0
for i in S:
    if i == 'a':
        if rank < A + B:
            rank += 1
            print('Yes')
            continue

    if i == 'b':
        if rank < A + B and foreign_rank < B:
            rank += 1
            foreign_rank += 1
            print('Yes')
            continue

    print('No')

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

total = 0
totalB = 0
for c in S:
    if c == 'a':
        if total < A + B:
            total += 1
            print('Yes')
        else:
            print('No')
    elif c == 'b':
        if total < A + B and totalB < B:
            total += 1
            totalB += 1
            print('Yes')
        else:
            print('No')
    else:
        print('No')

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

passa = 0
passb = 0
for c in S:
    if c == 'a':
        if passa+ passb < A+B:
            print('Yes')
            passa+=1
        else:
            print('No')
    elif c == 'b':
        if passa + passb < A+B and passb < B:
            print('Yes')
            passb+=1
        else:
            print('No')
    else:
        print('No')

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

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

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


qualified = 0
qualified_oversea = 0
for i, symbol in enumerate(s):
	if symbol == 'c':
		print("No")
	elif symbol == 'a':
		if qualified < a + b:
			print("Yes")
			qualified += 1
		else:
			print("No")
	elif symbol == 'b':
		if qualified < a + b and qualified_oversea < b:
			print("Yes")
			qualified += 1
			qualified_oversea += 1
		else:
			print("No")

Solution (Python):
n,a,b=map(int,input().split())
c=a+b
s=input()
count1=0
count2=0
for i in s:
    if count1>=c:
        print("No")
        continue
    else:
        if i=="a":
            print("Yes")
            count1+=1
            continue
        if i=="b" and count2<b:
            print("Yes")
            count1+=1;count2+=1
            continue
        print("No")

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

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n,a,b = m()

s = input()[:-1]

ans = ["" for i in range(n)]
co = 0
cob = 0
for i in range(n):
    if s[i] == "a":
        if co < a+b:
            co += 1
            ans[i] = "Yes"
        else:
            ans[i] = "No"

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

Solution (Python):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    n,a,b = LI()
    s = S()
    cnt = 1
    cntb = 1

    for i in s:
        if i == "a":
            if cnt<=a+b:
                print("Yes")
                cnt+=1
            else:
                print("No")
        elif i == "b":
            if cnt<=a+b and cntb<=b:
                print("Yes")
                cnt+=1
                cntb+=1
            else:
                print("No")
        else:
            print("No")
main()

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

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

Solution (Python):

N, A, B = map(int, input().split())
S = input()
a = 0
b = 0

for i in S:
    if i == "a":
        if a + b < A + B:
            print ("Yes")
            a += 1
        else:
            print ("No")
    elif 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()

qual = {"A": 0, "B": 0}

for i in range(N):
    ans = False
    l = S[i]
    if qual["A"] + qual["B"] < A + B:
        if l == "a":
            ans = True
            qual["A"] += 1
        elif l == "b":
            if qual["B"] < B:
                ans = True
                qual["B"] += 1
    if ans:
        print('Yes')
    else:
        print('No')

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

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

num=0
f=1
for i in range(n):
  alp=text[i]
  if alp=='a' and num<(a+b):
    print("Yes")
    num+=1
  elif alp=='b' and num<(a+b) and f<=b:
    print("Yes")
    num+=1
    f+=1
  else:
    print("No")

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

a = 0
b = 0

S = input()
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())
A += B
cnt = [0,0]
S=list(input())
for i in range(N):
    if S[i] == 'c':
        print("No")
    elif S[i] == 'a':
        if cnt[0] < A:
            print("Yes")
            cnt[0] += 1
        else:
            print("No")
    else:
        if cnt[0] < A and cnt[1] < B:
            print("Yes")
            cnt[0] += 1
        else:
            print("No")
        cnt[1] += 1

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

Solution (Python):
'''
Created on 2020/08/19

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  N,A,B=map(int,pin().split())
  S=pin()[:-1]
  cnt=0
  cn=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 cn<B:
      cnt+=1
      cn+=1
      print("Yes")
    else:
      print("No")
  return 

main()

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

cnt = A + B
Bcnt = B

for i in range(len(S)):
    if S[i] == 'a' and cnt > 0:
        print('Yes')
        cnt -= 1
    elif S[i] == 'b' and cnt > 0 and Bcnt > 0:
        print('Yes')
        cnt -= 1
        Bcnt -= 1
    else:
        print('No')

Solution (Python):
n,a,b = map(int, input().split())
s = input()
students_passed = 0
rank = 0
for i, j in enumerate(s):
    if students_passed < a+b and j == 'a':
        students_passed += 1
        print('Yes')
    elif students_passed < a+b and j == 'b' and rank <= b-1:
        rank += 1
        students_passed += 1
        print('Yes')
    else:
        print('No')

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

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

  sum_of_successful_candidate = 0
  sum_of_successful_b = 0

  for i, s in enumerate(S):
    if sum_of_successful_candidate >= A + B:
      for _ in range(N-i):
        print("No")
      return True

    if s == "a":
      sum_of_successful_candidate += 1
      print("Yes")
    elif s == "b" and sum_of_successful_b < B:
      sum_of_successful_candidate += 1
      sum_of_successful_b += 1
      print("Yes")
    else:
      print("No")

  return True


if __name__ == "__main__":
  resolve()

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

  sum_of_successful_candidate = 0
  sum_of_successful_b = 0

  for i, s in enumerate(S):
    if sum_of_successful_candidate >= A + B:
      for _ in range(N-i):
        print("No")
      return True

    if s == "a":
      sum_of_successful_candidate += 1
      print("Yes")
    elif s == "b" and sum_of_successful_b < B:
      sum_of_successful_candidate += 1
      sum_of_successful_b += 1
      print("Yes")
    else:
      print("No")

  return True


if __name__ == "__main__":
  resolve()

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

  sum_of_successful_candidate = 0
  sum_of_successful_b = 0

  for i, s in enumerate(S):
    if sum_of_successful_candidate >= A + B:
      for _ in range(N-i):
        print("No")
      return True

    if s == "a":
      sum_of_successful_candidate += 1
      print("Yes")
    elif s == "b" and sum_of_successful_b < B:
      sum_of_successful_candidate += 1
      sum_of_successful_b += 1
      print("Yes")
    else:
      print("No")

  return True


if __name__ == "__main__":
  resolve()

Solution (Python):
datalist=list(map(int,input().split()))
N, A, B = datalist[0], datalist[1], datalist[2]
strings=str(input())
na,nb=0,0
out=[]
for i in range(len(strings)):
  if strings[i]=="a":
    if na + nb < A+B:
      out.append("Yes")
      na += 1
    else:
      out.append("No")
  elif strings[i]=="b":
    if na + nb < A+B:
      if nb < B:
        out.append("Yes")
        nb += 1
      else:
        out.append("No")
    else:
      out.append("No")
  else:
    out.append("No")
print("\n".join(out))

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

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

Solution (Python):
n, a, b = [int(x) for x in input().split()]
participants = list(input())
passers = []
bs_rank = 1


for i in range(len(participants)):
      if participants[i] == "a":          
            if len(passers) < a+b:
                  print("Yes")
                  passers.append(i+1)
            else:
                  print("No")
      
      elif participants[i] == "b":        
            if len(passers) < a+b and bs_rank <= b:
                  print("Yes")
                  passers.append(i+1)
                  bs_rank += 1
            else:
                  print("No")
                  
      else: 
            print("No")

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

Solution (Python):
n, a, b = map(int, input().split())
s = input()
A = 0
B = 0
for i in range(len(s)):
    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):
import math
a,b,c = map(int,input().split())
s = input()
g = 1
d = b+c
k = 1
for i in range(a):
    if s[i]=='c':
        print("No")
    elif s[i] == 'a' and k<=d:
        print("Yes")
        k+=1
    elif s[i] == 'b' and g<=c and k<=d:
        print("Yes")
        k+=1
        g += 1
    else:
        print("No")

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

for x in s:
    if x == 'a' and c > 0:
        c -= 1
        print('Yes')
    elif x == 'b' and b > 0 and c > 0:
        b -= 1
        c -= 1
        print('Yes')
    else:
        print('No')

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

Solution (Python):
N, A, B = map(int, input().split())
S = input()
vec_yn = ["No"] * len(S)
passed = 0
passed_oversea = 0
for i in range(len(S)):
    if S[i]=='a':
        if passed < A+B:
            vec_yn[i] = "Yes"
            passed+=1
        else:
            pass
    elif S[i]=='b':
        if passed < A+B and passed_oversea < B:
            vec_yn[i] = "Yes"
            passed+=1
            passed_oversea+=1
        else:
            pass
    else:
        pass

for i in range(len(S)):
    print(vec_yn[i])

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

a_cnt,b_cnt,cnt = 0,0,0
s = input()
cnt = a+b
for i in range(n):
    if s[i] == "a":
        if a_cnt + b_cnt < cnt:
            a_cnt +=1
            print("Yes")
        else:
            print("No")
        
    elif s[i] == "b":
        if a_cnt + b_cnt < cnt and b_cnt < b:
            b_cnt +=1
            print("Yes")
        else:
            print("No")
        
    elif s[i] == "c":
        print("No")

Solution (Python):
import sys
def S(): return sys.stdin.readline().rstrip()
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def solve():
    n,a,b = IL()
    s = S()
    count = 0
    fs = 1
    for rep in s:
        if rep=='a':
            if count < a+b:
                count += 1
                print('Yes')
            else:
                print('No')
        elif rep=='b':
            if count<a+b and fs<=b:
                count += 1
                fs += 1
                print('Yes')
            else:
                print('No')
        else:
            print('No')
    return

if __name__=='__main__':
    solve()

Solution (Python):
N, A, B = map(int, input().split())
S = 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 + 1 <= B:
            print('Yes')
            b += 1
        else:
            print('No')
    else:
        print('No')

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

pass_a = 0
pass_b = 0
for c in s:
    if c == 'a':
        if pass_a + pass_b < a + b:
            print('Yes')
            pass_a += 1
        else:
            print('No')
    elif c == 'b':
        if pass_a + pass_b < a + b and pass_b < b:
            print('Yes')
            pass_b += 1
        else:
            print('No')
    else:
        print('No')

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

Solution (Python):
def qsimulator(s, a, b):
	paas = 0
	bpaas = 0
	aflg = True
	bflg = True
	total = a + b
	res = []
	for i in s:
		if i == 'c':
			res.append("No")
		elif i == 'a':
			if aflg and paas < total:
				paas += 1
				res.append("Yes")
			else:
				aflg = False
				res.append("No")
		else:
			if bflg and paas < total and bpaas < b:
				paas += 1
				bpaas += 1
				res.append("Yes")
			else:
				bflg = False
				res.append("No")
	return res
n, a, b = map(int, input().split())
s = input()
ans = qsimulator(s, a, b)
for i in ans:
	print(i)

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

cnt_a = 0
cnt_b = 0
for s in S:
    if s == 'c':
        print('No')
    elif s == 'b':
        if (cnt_b < B) and ((cnt_a + cnt_b) < (A + B)):
            print('Yes')
            cnt_b += 1
        else:
            print('No')
    elif s == 'a':
        if (cnt_a + cnt_b) < (A + B):
            cnt_a += 1
            print('Yes')
        else:
            print('No')

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

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

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

Solution (Python):

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

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

Solution (Python):
N,A,B=map(int,input().split())
s=input()
kaigai=1
jyun=1
for i in range(N):
  if s[i]=="c":
    print("No")
  elif s[i]=="a":
    if jyun<=A+B:
      print("Yes")
      jyun+=1
    else:
      print("No")
  else:
    if jyun<=A+B and kaigai<=B:
      print("Yes")
      kaigai+=1
      jyun+=1
    else:
      print("No")

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

count_in = 0
count_out = 0
for s in S:
    if s == 'a':
        if count_in+count_out<A+B:
            print('Yes')
            count_in += 1
            continue

    if s == 'b':
        if count_out<B and count_in+count_out<A+B:
            print('Yes')
            count_out += 1
            continue
    print('No')

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

s = input()

pas = 0
overseas = 1

for i in range(n):
    if s[i] == 'a':
        if pas < A + B:
            print("Yes")
            pas += 1
        else:
            print("No")
    elif s[i] == 'b':
        if pas < A + B and overseas <= B:
            print("Yes")
            pas += 1
            overseas += 1
        else:
            print("No")
    else:
        print("No")

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from functools import reduce
from math import gcd


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



N, A, B = ints()
S = read()[:-1]
cnt = Counter('')
for s in S:
    if s == 'a' and cnt['a'] + cnt['b'] < A + B:
        print('Yes')
        cnt.update(s)
    elif s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B:
        print('Yes')
        cnt.update(s)
    else:
        print('No')

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

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

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