qyliang/CodeNanoFix huggingface dataset:
Buggy code:
n, a, b = map(int, input().split())
s = input()

all = list(s)
count = 0
count_b = 0
for i in all:
    if i == 'a':
        if count < a + b:
            print('Yes')
            count += 1
        else:
            print('No')
    if i == 'b':
        if (count < a + b) and (count_b <= b):
            print('Yes')
            count += 1
            count_b += 1
        else:
            print('No')
    else:
        print('No')


Fixed code:
n, a, b = map(int, input().split())
s = input()

all = list(s)
count = 0
count_b = 0
for i in all:
    if i == 'a':
        if count < a + b:
            print('Yes')
            count += 1
        else:
            print('No')
    elif i == 'b':
        if (count < a + b) and (count_b < b):
            print('Yes')
            count += 1
            count_b += 1
        else:
            print('No')
    else:
        print('No')
Buggy code:
N, A, B = map(int, input().split())
S = input()

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


Fixed code:
N, A, B = map(int, input().split())
S = input()

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

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

cnt_s = 0
cnt_b = 0

for i in range(n):
    if cnt_s <= a+b and i == 'a':
        print('Yes')
        cnt_s += 1
    elif cnt_s > a+b and i == 'a':
        print('No')
    elif cnt_s <= a+b and cnt_b <= b and i =='b':
        print('Yes')
        cnt_b += 1
        cnt_s += 1
    else:
        print('No')
    

Fixed code:
n,a,b=map(int,input().split())
s = input()

cnt_s = 0
cnt_b = 0

for i in range(len(s)):
    if s[i] == 'a' and cnt_s < a+b:
        print('Yes')
        cnt_s += 1
    elif s[i] == 'a' and cnt_s > a+b:
        print('No')
    elif s[i] =='b' and cnt_s < a+b and cnt_b < b:
        print('Yes')
        cnt_b += 1
        cnt_s += 1
    else:
        print('No')
Buggy code:
n,a,b=map(int,input().split())
ca,cb=0,0
s=input()
for i in range(n):
    if s[i]=="a":
        if ca<a+b:
            print("Yes")
            ca+=1
    elif s[i]=="b":
        if ca<a+b and cb<b:
            print("Yes")
            ca+=1;cb+=1
        else: print("No")
    else: print("No")

Fixed code:
n,a,b=map(int,input().split())
ca,cb=0,0
s=input()
for i in range(n):
    if s[i]=="a":
        if ca<a+b:
            print("Yes")
            ca+=1
        else: print("No")
    elif s[i]=="b":
        if ca<a+b and cb<b:
            print("Yes")
            ca+=1;cb+=1
        else: print("No")
    else: print("No")
Buggy code:
#%%
n, a, b = map(int, input().split())
s = list(input())

c = 0
d = 0

for i in range(n):
    if s[i] == 'a':
        if c < a+b:
            c += 1
            print('Yes')
        else:
            print('no')
    elif s[i] == 'b':
        if c < a+b:
            if d < b:
                print('Yes')
                c += 1
                d += 1
            else:
                print('No')
        else:
            print('No')
    else:
        print('No')




#%%


Fixed code:
#%%
n, a, b = map(int, input().split())
s = list(input())

c = 0
d = 0

for i in range(n):
    if s[i] == 'a':
        if c < a+b:
            c += 1
            print('Yes')
        else:
            print('No')
    elif s[i] == 'b':
        if c < a+b:
            if d < b:
                print('Yes')
                c += 1
                d += 1
            else:
                print('No')
        else:
            print('No')
    else:
        print('No')




#%%
Buggy code:
n,a,b = map(int,input().split())
s=input()

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

Fixed code:
n,a,b = map(int,input().split())
s=input()

AB=0
B=0
for i in range(n):
    if s[i] =='a':
        if AB<a+b:
            AB+=1
            print('Yes')
        else:
            print('No')
    elif s[i] =='b':
        B+=1
        if AB<a+b and B<=b:
            AB+=1
            print('Yes')
        else:
            print('No')
    else:
        print('No')
Buggy code:
N, A, B = map(int, input().split()) 
s = [i for i in input()]
count = 0
sb = 0

for i in range(len(s)):
      if s[i] == 'a':
            if count < (A+B):
                  print('Yes')
                  count +=1
            else:
                  print('No')
  
      elif s[i] == 'b':
            if (count < (A+B)) and (sb <= B):
                  print('Yes')
                  count += 1
                  sb += 1
            else:
                  print('No')
      
      elif s[i] == 'c':
            print('No')

Fixed code:
N, A, B = map(int, input().split()) 
s = [i for i in input()]
count = 0
sb = 0

for i in range(len(s)):
      if s[i] == 'a':
            if count < (A+B):
                  print('Yes')
                  count +=1
            else:
                  print('No')
  
      elif s[i] == 'b':
            if (count < (A+B)) and (sb < B):
                  print('Yes')
                  count += 1
                  sb += 1
            else:
                  print('No')
      
      elif s[i] == 'c':
            print('No')
Buggy code:
n,a,b=map(int,input().split())
s=input()
pa,pb=0,0
for i in range(n):
  if s[i]=='a':
    pa+=1
    if pa+prb<=a+b:
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    pb+=1
    if pa+pb<=a+b and pb<=b:
      print('Yes')
    else:
      print('No')
  else:
    print('No')

Fixed code:
n,a,b=map(int,input().split())
s=input()
pa,pb=0,0
for i in range(n):
  if s[i]=='a':
    if pa+pb<a+b:
      pa+=1
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    if pa+pb<a+b and pb<b:
      pb+=1
      print('Yes')
    else:
      print('No')
  else:
    print('No')
Buggy code:
N,A,B = map(int,input().split())
S = input()

pass_num = 0

for i in S:
    if i == 'a':
        if (A + B)-1 >= pass_num:
            print('Yes')
            pass_num += 1
        else:
            print('No')
    elif i == 'b':
        if B-1 >= pass_num:
            print('Yes')
            pass_num += 1
        else:
            print('No')
    else:# i == 'c'
        print('No')

Fixed code:
N,A,B = map(int,input().split())
S = input()

pass_num = 0
pass_fo = 0

for i in S:
    if i == 'a':
        if (A + B)-1 >= pass_num:
            print('Yes')
            pass_num += 1
        else:
            print('No')
    elif i == 'b':
        if ((A+B-1) >= pass_num)and(pass_fo <= B-1):
            print('Yes')
            pass_num += 1
            pass_fo += 1
        else:
            print('No')
    else:# i == 'c'
        print('No')
Buggy code:
n,a,b=map(int,input().split())
s=input()
for i in s:
    if a+b>0:
        if i=="a":
            a-=1
            print("Yes")
            continue
       elif i=="b" and b>0:
            b-=1
            print("Yes")
            continue
    print("No")


Fixed code:
n,a,b=map(int,input().split())
s=input()
for i in s:
    if a+b>0:
        if i=="a":
            a-=1
            print("Yes")
            continue
        if i=="b" and b>0:
            b-=1
            print("Yes")
            continue
    print("No")
Buggy code:
N,A,B=map(int,input(),())
S=input()

nowA=0
nowB=0

for s in S:
    if s=='c':
        print('No')
    elif s=='a':
        if nowA+nowB<=A+B:
            nowA+=1
            print('Yes')
        else:
            print('No')
    else:
        if nowA+nowB<=A+B and nowB<=B:
            nowB+=1
            print('Yes')
            nowB+=1
        else:
            print('No')


Fixed code:
N,A,B=map(int,input().split())
S=input()

nowA=0
nowB=0

for s in S:
    if s=='c':
        print('No')
    elif s=='a':
        if nowA+nowB<A+B:
            print('Yes')
            nowA+=1
        else:
            print('No')
    else:
        if nowA+nowB<A+B and nowB<B:
            print('Yes')
            nowB+=1
        else:
            print('No')
Buggy code:
N, A, B = a,b=map(int, input().split())
S = input()

qualified = 0
qualified_foreign = 0.
for s in S:
    if s == 'c':
        print('No')
    elif s == 'a':
        if qualified < A + B:
            print('Yes')
            qualified += 1
        else:
            print('No')
    else:
        if (qualified < A + B) & (qualified_foreign < B):
            print('Yes')
            qualified += 1
            qualified_foreign += 1
        else:
            print('No')
  

Fixed code:
N, A, B = map(int, input().split())
S = input()

qualified = 0
qualified_foreign = 0.
for s in S:
    if s == 'c':
        print('No')
    elif s == 'a':
        if qualified < A + B:
            print('Yes')
            qualified += 1
        else:
            print('No')
    else:
        if (qualified < A + B) & (qualified_foreign < B):
            print('Yes')
            qualified += 1
            qualified_foreign += 1
        else:
            print('No')
Buggy code:
n, a, b = [int(i) for i in input().split()]
border = a + b
foreign_pass = 0
passed = 0
s = input()
for x in s:
    if passed >= border:
        print('No')
        continue
    if x == 'a':
        print('Yes')
        passed += 1
    elif x == 'b' and foreign_pass < b:
        print('Yes')
        foreign_pass += 1
    else:
        print('No')

Fixed code:
n, a, b = [int(i) for i in input().split()]
border = a + b
foreign_pass = 0
passed = 0
s = input()
for x in s:
    if passed >= border:
        print('No')
        continue
    if x == 'a':
        print('Yes')
        passed += 1
    elif x == 'b' and foreign_pass < b:
        print('Yes')
        passed += 1
        foreign_pass += 1
    else:
        print('No')
Buggy code:
n,a,b = map(int, input().split())
s = str(input())
counter1 = counter2 = 0
for char in s:
    if char != "c":
        counter1 += 1
    if char == "b":
        counter2 += 1
    if (counter1 <= (a+b)) & (char == 'a'):
        print("Yes")
    elif (counter1 <= (a+b)) & (char == 'b') & (counter2 <= b):
        print("Yes")
    else:
        print("No")

Fixed code:
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")
Buggy code:
n, a, b = map(int, input().split())
s = input()
q = [1] * n
for i,l in enumerate(s):
    q[i] *= (l == "b" and b > 0) or (l == "a" and a + b > 0)
    b -= q[i]
print("".join(["YNeos"[1-i::2] for i in q]))

Fixed code:
n, a, b = map(int, input().split())
s = input()
q = [1] * n
for i,l in enumerate(s):
    q[i] *= ((l == "b" and b > 0) or l == "a") and a + b > 0
    b -= q[i]*(l == "b")
    a -= q[i]*(l == "a")
print("\n".join(["YNeos"[1-i::2] for i in q]))
Buggy code:
N, A, B = map(int, input().split())
S = input()

num = 0
num_b = 0

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


Fixed code:
N, A, B = map(int, input().split())
S = input()

num = 0
num_b = 0

for i in range(N):
    if S[i] == "a":
        if num < A + B:
            print("Yes")
            num += 1
        else:
            print("No")
    elif S[i] == "b":
        if num < A + B and num_b < B:
            print("Yes")
            num += 1
            num_b += 1
        else:
            print("No")
    else:
        print("No")
Buggy code:
def examA():
    S = SI(); N = len(S)
    T = "CODEFESTIVAL2016"
    ans = 0
    for i in range(N):
        if S[i]!=T[i]:
            ans +=1
    print(ans)
    return

def examB():
    N, A, B = LI()
    S = SI()
    d = defaultdict(int)
    for s in S:
        if s=="a":
            if d["a"]+d["b"]<A+B:
                print("YES")
                d[s] += 1
            else:
                print("NO")
        elif s=="b":
            if d["a"]+d["b"]<A+B and d["b"]<B:
                print("YES")
                d[s] += 1
            else:
                print("NO")
        else:
            print("NO")
    return

def examC():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,ALPHABET, _ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 1e-9
alphabet = [chr(ord('a') + i) for i in range(26)]
ALPHABET = [chr(ord('A') + i) for i in range(26)]

if __name__ == '__main__':
    examB()


Fixed code:
def examA():
    S = SI(); N = len(S)
    T = "CODEFESTIVAL2016"
    ans = 0
    for i in range(N):
        if S[i]!=T[i]:
            ans +=1
    print(ans)
    return

def examB():
    N, A, B = LI()
    S = SI()
    d = defaultdict(int)
    for s in S:
        if s=="a":
            if d["a"]+d["b"]<A+B:
                print("Yes")
                d[s] += 1
            else:
                print("No")
        elif s=="b":
            if d["a"]+d["b"]<A+B and d["b"]<B:
                print("Yes")
                d[s] += 1
            else:
                print("No")
        else:
            print("No")
    return

def examC():

    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,ALPHABET, _ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 1e-9
alphabet = [chr(ord('a') + i) for i in range(26)]
ALPHABET = [chr(ord('A') + i) for i in range(26)]

if __name__ == '__main__':
    examB()
Buggy code:
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')
        else:
            yesno.append('No')
        a+=1
    elif S[i]=='b':
        if a+b<A+B and c<=B:
            yesno.append('Yes')
        else:
            yesno.append('No')
        b+=1
        c+=1
    else:
        yesno.append('No')
for i in range(N):
    print(yesno[i])

Fixed code:
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])
Buggy code:
N, A, B = map(int, input().split())
S = input()
A += B
a = 0
b = 0

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

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

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

success = 0
foreigner = 0
count = 0

for i in s:
    if i == "a" and success <= a + b:
        print("Yes")
        success += 1
    elif i == "b" and success <= a + b and foreigner <= b:
        print("Yes")
        success += 1
        foreigner += 1
    else:
        print("No")
    count += 1
    if success == a + b:
        break

for _ in range(n - count):
    print("No")

Fixed code:
n, a, b = map(int, input().split())
s = input()

success = 0
foreigner = 0
count = 0

for i in s:
    if i == "a":
        print("Yes")
        success += 1
    elif i == "b" and foreigner < b:
        print("Yes")
        success += 1
        foreigner += 1
    else:
        print("No")
    count += 1
    if success == a + b:
        break

for _ in range(n - count):
    print("No")
Buggy code:
li = list(map(int,input().split()))
s=list(input())
cnt = 0
b = 0
for i in s:
    if i == "a":
        if cnt < li[1] + li[2]:
            cnt += 1
            print("Yes")
        else:
            print("No")
    elif i == "b":
        b += 1
        if cnt < li[1] + li[2]:
            if b < li[2]:
                cnt += 1
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")

Fixed code:
li = list(map(int,input().split()))
s=list(input())
cnt = 0
b = 0
for i in s:
    if i == "a":
        if cnt < li[1] + li[2]:
            cnt += 1
            print("Yes")
        else:
            print("No")
    elif i == "b":
        b += 1
        if cnt < li[1] + li[2]:
            if b <= li[2]:
                cnt += 1
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        #cnt -= 1
        print("No")
#print(a)
Buggy code:
n, a, b = map(int, input().split())
s = input()
cnt = 0
memo = 0
for i in range(n):
  if s[i] == 'c':
    print('No')
  else:
    if cnt < a + b:
      cnt += 1
      if s[i] == 'b' and memo <= b:
        memo += 1
        print('Yes')
      elif s[i] == 'a':
        print('Yes')
      else:
        print('No')   
    else:
      print('No')


Fixed code:
n, a, b = map(int, input().split())
s = input()
cnt = 1
memo = 1
for i in range(n):
  if s[i] == 'c':
    print('No')
  else:
    if cnt <= a + b:
      if s[i] == 'b' and memo <= b:
        memo += 1
        cnt += 1
        print('Yes')
      elif s[i] == 'a':
        cnt += 1
        print('Yes')
      else:
        print('No')   
    else:
      print('No')
Buggy code:
n,x,y=map(int,input().split())
s= input()
c=0
d=x+y
f= False
for i in range(n):
    if s[i]=="a":
        if c<=d:
            f=True
    elif s[i]=="b":
        if c<=d and c<=y:
            f=True
    if f:
        print("Yes")
        c+=1
    else:
        print("No")
    f=False

Fixed code:
n,x,y=map(int,input().split())
s= input()
c=0
d=x+y
e = 0
f= False
for i in range(n):
    if s[i]=="a":
        if c<d:
            f=True
    elif s[i]=="b":
        if c<d and e<y:
            f=True
            e+=1
    if f:
        print("Yes")
        c+=1
    else:
        print("No")
    f=False
Buggy code:
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")

Fixed code:
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")
Buggy code:
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:
            #print(a_cnt + b_cnt)
            print("Yes")
        else:
            print("No")
        a_cnt +=1
    elif s[i] == "b":
        if a_cnt + b_cnt < cnt and b_cnt < b:
            print("Yes")
        else:
            print("No")
        b_cnt +=1
    elif s[i] == "c":
        print("No")


Fixed code:
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(a_cnt + b_cnt)
            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")
Buggy code:
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 + b <= A + B:
            print('Yes')
        else:
            print('No')
        a += 1
    elif i == 'b':
        if a + b <= A + B and b < B:
            print('Yes')
        else:
            print('No')
        b += 1
    else:
        print('No')

Fixed code:
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')
Buggy code:
n,a,b=map(int,input().split())
s=input()
cnt=0
cnt_f=0
for i in range(n):
    if s[i] == 'a' and cnt < a+b:
        print('Yes')
        cnt+=1
    elif s[i] == 'b' and cnt < a+b and cnt_f <= b:
        print('Yes')
        cnt+=1
        cnt_f+=1
    elif s[i] == 'c':
        print('No')
    else:
        print('No')

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