qyliang/CodeNanoFix huggingface dataset:
Buggy code:
N, A, B = map(int,input().split())
S = input()
S = "a"*10000
yosen = 0
yosen_b = 1
for i in range(N):
    if S[i] == "a" and yosen < (A + B):
            print("Yes")
            yosen += 1
    elif S[i] == "b" and yosen < (A + B) and yosen_b <= B:
            print("Yes")
            yosen += 1
            yosen_b += 1
    else:
        print("No")

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

Fixed code:
N, A, B = map(int, input().split())
S = input()
y = 0
k = 0
for i in S:
    if i=='c':
        print('No')
    elif i=='a':
        if (y<(A+B)):
            print('Yes')
            y += 1
        else:
            print('No')
    else:
        if (y<(A+B))and(k<B):
            print('Yes')
            y += 1
            k += 1
        else:
            print('No')
Buggy code:
l = input().split()
s = input()

n = int(l[0])
a = int(l[1])
b = int(l[2])

count = 0
countt = 0
for i in s:
    if i == 'a':
        if count < a+b:
            count = count + 1
            print('YES')
        else:
            print('No')
    if i == 'b':
        if (count < a+b) and (countt < b):
            count = count + 1
            countt = countt + 1
            print('YES')
        else:
            print('NO')
    if i == 'c':
        print('NO')



Fixed code:
l = input().split()
s = input()
 
n = int(l[0])
a = int(l[1])
b = int(l[2])
 
count = 0
countt = 0
for i in s:
    if i == 'a':
        if count < a+b:
            count = count + 1
            print('Yes')
        else:
            print('No')
    if i == 'b':
        if (count < a+b) and (countt < b):
            count = count + 1
            countt = countt + 1
            print('Yes')
        else:
            print('No')
    if i == 'c':
        print('No')
Buggy code:
n,a,b = map(int, input().split())
s = str(input())
a_count,b_count = 0,0
for i in range(n):
  if s[i] == 'c':
    print('No')
  elif s[i] == 'a':
    if a_count+b_count < a+b:
      print('Yes')
      a_count += 1
    else:
      print('No')
  elif s[i] == 'b':
    if a_count+b_count < a+b and b_count < b:
      print('Yes')
      b_count += 1
    else:
      print('No')
print(a_count,b_count)

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

num=0
f=0
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")

Fixed code:
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")
Buggy code:
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])


Fixed code:
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])
Buggy code:
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")
    else:
      print("No")
    counta += 1
    countb += 1
  else:
    if counta < maxa:
      print("Yes")
    else:
      print("No")
    counta+=1

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

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

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

Fixed code:
count1 = 0
count2 = 0
N, A, B = map(int, input().split())
S = list(input())
for i in S:
  if i == "a" and A + B > count1:
    print("Yes")
    count1 += 1
  elif i == "b" and A + B > count1 and B > count2:
    print("Yes")
    count1 += 1
    count2 += 1
  else :
    print("No")
Buggy code:
N,A,B=map(int, input().split())
S=int(input().split())

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


Fixed code:
N,A,B=map(int, input().split())
S=input()
cntA=0
cntB=0
for s in S:
  if s == 'c':
    print('No')
    continue
  if s == 'a' and (cntA+cntB) < A+B:
    print('Yes')
    cntA +=1
  elif (s == 'b') and ((cntA+cntB) < A+B) and (cntB < B):
    print('Yes')
    cntB +=1
  else:
    print('No')
Buggy code:
N,A,B=map(int,input().split())
S=input()
t_count=0
b_count=0
flag=None

for i in S:
  if i=="c":
    print("No")
  else:
    t_count+=1
    if t_count>A+B:
      print("No")
    else:
      if i=="b":
        b_count+=1
        if b_count<=B:
          print("Yes")
        else:
          print("No")
      else:
        print("Yes")
        

Fixed code:
N,A,B=map(int,input().split())
S=input()
t_count=0
b_count=0
flag=None

for i in S:
  if i=="c":
    print("No")
  else:
    if i=="a":
      t_count+=1
      if t_count<=A+B:
        print("Yes")
      else:
        print("No")
    else:
      b_count+=1
      if b_count<=B:
        t_count+=1
        if t_count<=A+B:
          print("Yes")
        else:
          print("No")
      else:
        print("No")
Buggy code:
n,a,b=map(int,input().split())
s=input()
w=a+b
for i in range(len(s)):
  if w<1:
    print("No")
  elif s[i]=="a":
    print("Yes")
    w-=1
  elif s[i]=="b":
    print(("No","Yes")[b>0])
    b-=1
    w-=1
  else:
    print("No")

Fixed code:
n,a,b=map(int,input().split())
s=input()
w=a+b
for i in range(len(s)):
  if w<1:
    print("No")
  elif s[i]=="a":
    print("Yes")
    w-=1
  elif s[i]=="b" and b>0:
    print("Yes")
    b-=1
    w-=1
  else:
    print("No")
Buggy code:
n,a,b=map(int,input().split())
s=input().strip()
njp=0
nop=0
for i in range(len(s)):
  if s[i]=='a':
    if njp<(a+b):
      njp+=1
      print('Yes')
    else:
      print('No')
  elif s[i]=='b':
    if njp<(a+b):
      if nop<=b:
        nop+=1
        njp+=1
        print('yes')
      else:
        print('No')
    else:
      print('No')
  else:
    print('No')


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

Fixed code:
n,a,b =map(int,input().split())
s = input()
cnt = 0
p = 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':
        p +=1
        if cnt <a+b and p <=b:
            print('Yes')
            cnt +=1
        else:
            print('No')
    else:
        print('No')
Buggy code:
N, A, B = input().split()
A = int(A)
B = int(B)
s = input()

accepted = 0
B_checked = 0

for i in range(len(s)):
    if s[i] == "c":
        print("No")
    elif s[i] == "a":
        accepted += 1
        print("Yes")
    else:
        B_checked += 1
        if (B_checked < B):
            accepted += 1
            print("Yes")
        else:
            print("No")

    if (accepted >= (A + B)):
        for i in range(len(s) - i - 1):
            print("No")

        break

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

accepted = 0
B_checked = 0

for i in range(len(s)):
    if s[i] == "c":
        print("No")
    elif s[i] == "a":
        accepted += 1
        print("Yes")
    else:
        B_checked += 1
        if (B_checked <= B):
            accepted += 1
            print("Yes")
        else:
            print("No")

    if (accepted >= (A + B)):
        for i in range(len(s) - i - 1):
            print("No")

        break
Buggy code:
n,a,b = map(int, input().split())
s = input()
passed = 0
passed_b = 0
for i in s:
    if i == 'a':
        print('Yes') if passed <= a+b else print('No')
        passed += 1
    elif i == 'b':
        print('Yes') if (passed <= a+b) and (passed_b < b) else print('No')
        passed += 1
        passed_b += 1
    else:
        print('No')

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

Fixed code:
N, A, B = map(int, input().split())
S = input()
a = 0
b = 0
for s in S:
  if s == 'c':
    print('No')
  elif s == 'a':
    if a + b < A + B:
      print('Yes')
      a += 1
    else:
      print('No')
  else:
    if a + b < A + B and b < B:
      print('Yes')
      b += 1
    else:
      print('No')
Buggy code:
"""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"):
        rank_a += 1
        if(rank_a+rank_b < A+B):
            print("Yes")
        else:
            print("No")
    elif(S[i] == "b"):
        rank_b += 1
        if(rank_a+rank_b < A+B):
            if(rank_b < B):
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")


Fixed code:
"""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")
Buggy code:
x, s = *open(0),

n, a, b = map(int, x.split())



p = 0
wp = 0

for char in s:
    if char == 'c' or p >= a+b:
        print('No')
        continue
    if char == 'a':
        p += 1
        print('Yes')
        continue
    if wp < b:
        p += 1
        wp += 1
        print('Yes')
    else:
        print('No')

Fixed code:
x = input()
s = input()

n, a, b = map(int, x.split())

p = 0
wp = 0

for char in s:
    if char == 'c' or p >= a+b:
        print('No')
        continue
    if char == 'a':
        p += 1
        print('Yes')
        continue
    if wp < b:
        p += 1
        wp += 1
        print('Yes')
    else:
        print('No')
Buggy code:
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)

Fixed code:
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)
Buggy code:
N, A, B = map(int, input().split())
C = input()
D = [C[i:i+1] for i in range(N)]
AA = 0
BB = 0
for i in(D):
  if D[i] == 'c':
    print('No')
  elif D[i] =='a' and A+B > AA+BB:
    print('Yes')
    AA += 1
  elif D[i] =='a' and A+B > AA+BB and BB < B:
    print('Yes')
    BB += 1
  else:
    print('No')

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

a_pass = 0
b_pass = 0

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

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

a_pass = 0
b_pass = 0

for s in S:
    if s == 'a':
        if (a_pass + b_pass) < (A + B):
            print('Yes')
            a_pass += 1
        else:
            print('No')
    elif s == 'b':
        if (a_pass + b_pass) < (A + B) and b_pass < B:
            print('Yes')
            b_pass += 1
        else:
            print('No')
    elif s == 'c':
        print('No')
Buggy code:
def resolve():
    N, A, B = list(map(int, input().split()))
    S = str(input())
    num = 0
    foreignnum = 1
    for i in range(N):
        if S[i] == 'a':
            if (num < A + B):
                num += 1
                print('Yes')
            else:
                print('No')

        if S[i] == 'b':
            if (num < A + B) and (foreignnum <= B):
                num += 1
                foreignnum += 1
                print('Yes')
            else:
                print('No')

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

    return

 resolve()

Fixed code:
def resolve():
    N, A, B = list(map(int, input().split()))
    S = str(input())
    num = 0
    foreignnum = 1
    for i in range(N):
        if S[i] == 'a':
            if (num < A + B):
                num += 1
                print('Yes')
            else:
                print('No')

        if S[i] == 'b':
            if (num < A + B) and (foreignnum <= B):
                num += 1
                foreignnum += 1
                print('Yes')
            else:
                print('No')

        if S[i] == 'c':
            print('No')
    return
resolve()
Buggy code:
n, a, b = map(int, input().split())
s = input()

cnt_all = 0
cnt_for = 0
ans = []
for i in range(n):
    if s[i] == "c":
        ans.append("No")
    elif s[i] == "a":
        if cnt_all < a + b:
            cnt_all += 1
            ans.append("Yes")
        else:
            ans.append("No")
    else:
        if cnt_all < a + b and cnt_for <= b:
            cnt_for += 1
            cnt_all += 1
            ans.append("Yes")
        else:
            ans.append("No")
print("\n".join(ans))

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

cnt_all = 0
cnt_for = 0
ans = []
for i in range(n):
    c = "No"
    if s[i] == "a" and cnt_all < a + b:
        cnt_all += 1
        c = "Yes"
    if s[i] == "b" and cnt_all < a + b and cnt_for+1 <= b:
        cnt_for += 1
        cnt_all += 1
        c = "Yes"
    ans.append(c)
print("\n".join(ans))
Buggy code:
N, A, B = list(map(int, input().split()))
S = input()
passed_num = 0
passed_foreigners_num = 0
for i in S:
    if passed_num < A + B:
        if i == 'a':
            print('yes')
            passed_num += 1 
        elif i == 'b' and passed_foreigners_num < B:
            print(i)
            print('yes')
            passed_num += 1 
            passed_foreigners_num += 1
        else:
            print('No')
    else:
        print('No')

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


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

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

count = 0
foreign = 0
for s_i in s:
  if s_i=='a':
    if count<=a+b:
      count+=1
      print("Yes")
  elif s_i=='b':
    if count<=a+b and foreign <= b:
      count+=1
      foreign+=1
      print("Yes")
  else:
    print("No")

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

count = 0
foreign = 0
for s_i in s:
  if s_i=='a':
    if count<a+b:
      count+=1
      print("Yes")
    else:
      print("No")
  elif s_i=='b':
    if count<a+b and foreign < b:
      count+=1
      foreign+=1
      print("Yes")
    else:
      print("No")
  else:
    print("No")
Buggy code:
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()

Fixed code:
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()
Buggy code:
n,a,b=map(int,input().split())
s=input()
A=0
B=0
for i in s:
    if A+B<=a+b:
        if i=="a":
            A+=1
            print("Yes")
        elif i=="b" and B<b:
            B+=1
            print("Yes")
        else:
            print("No")

Fixed code:
n,a,b=map(int,input().split())
s=input()
c=a+b
A=0
B=0
for i in s:
    if A+B<c:
        if i=="a":
            A+=1
            print("Yes")
        elif i=="b" and B<b:
            B+=1
            print("Yes")
        else:
            print("No")
    else:
        print("No")