ZhenlongDai/ACPR huggingface dataset:
Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, A, B = map(int, input().split())
S = input()
 
ok_count = 0
ok_fcount = 0
for i in range(N):
  if S[i] == 'a':
    if ok_count < A+B-1:
      print('Yes')
      ok_count +=1
      
    else:
      print('No')
      
  elif S[i] == 'b':
    if ok_count <= A+B-1 and ok_fcount <= B-1:
      print('Yes')
      ok_count+=1
      ok_fcount+=1
      
    else:
      print('No')
      
  else:
    print('No')


Failing test case input:
10 2 1
bbaacaccba

Expected output:
Yes
No
Yes
Yes
No
No
No
No
No
No


Actual output:
Yes
No
Yes
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
S = input()
 
ok_count = 0
ok_fcount = 0
for i in range(N):
  if S[i] == 'a':
    if ok_count < A+B:
      print('Yes')
      ok_count +=1
      
    else:
      print('No')
      
  elif S[i] == 'b':
    if ok_count < A+B and ok_fcount < B:
      print('Yes')
      ok_count+=1
      ok_fcount+=1
      
    else:
      print('No')
      
  else:
    print('No')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
S = list(input())

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

Failing test case input:
12 1 2
cabbabaacaba

Expected output:
No
Yes
Yes
Yes
No
No
No
No
No
No
No
No


Actual output:
No
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No


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

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

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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")
        

Failing test case input:
12 6 1
cabbabaacaba

Expected output:
No
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes


Actual output:
No
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
No


Fixed submission (verdict: Accepted):
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")
Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    quantity, A, B = map(int, input().split())
    l = list(input())
    yes = 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':
            if yes < (A + B) and yes <= B:
                print('Yes')
                yes = yes + 1

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

main()

Failing test case input:
12 14 3
caababaccaba

Expected output:
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes


Actual output:
No
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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()

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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 >= pass_num:
            print('Yes')
            pass_num += 1
        else:
            print('No')
    else:
        print('No')

Failing test case input:
12 24 1
caabbbabcaba

Expected output:
No
Yes
Yes
Yes
No
No
Yes
No
No
Yes
No
Yes


Actual output:
No
Yes
Yes
No
No
No
Yes
No
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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:
        print('No')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
s = input()

capacity = 0
f_capacity = 0

for c in s:
    if c == 'a':
        if capacity < a+b:
            capacity += 1
            print('YES')
        else:
            print('NO')
    elif c == 'b':
        if capacity < a+b and f_capacity < b:
            capacity += 1
            f_capacity += 1
            print('YES')
        else:
            print('NO')
    else:
        print('NO')

Failing test case input:
12 4 3
abaccababaac

Expected output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
No
No


Actual output:
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
NO
NO


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
s = input()

capacity = 0
f_capacity = 0

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

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
5 2 2
ccbcc

Expected output:
No
No
Yes
No
No


Actual output:
No
No
yes
No
No


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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-2:
            print("Yes")
            now+=1
        else:
            print("No")
    elif s[i]=="b":
        nowb+=1
        if nowb<=b and now<ab-2:
            print("Yes")
            ab+=1
            now+=1
        else:
            print("No")
    else:
        print("No")

Failing test case input:
12 3 0
abacbababaac

Expected output:
Yes
No
Yes
No
No
Yes
No
No
No
No
No
No


Actual output:
Yes
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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")
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
12 3 0
abacbababaac

Expected output:
Yes
No
Yes
No
No
Yes
No
No
No
No
No
No


Actual output:
Yes
No
Yes
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int,input().split())
S = input()

a_counter = 0
b_counter = 0

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

Failing test case input:
12 2 1
abacbababaac

Expected output:
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No


Actual output:
Yes
Yes
Yes
No
Yes
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
N, A, B = map(int,input().split())
S = input()

a_counter = 0
b_counter = 0

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

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
12 2 1
abacbababaac

Expected output:
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No


Actual output:
Yes
yes
Yes
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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

Failing test case input:
12 16 2
cabbabaacaaa

Expected output:
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes


Actual output:
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES


Fixed submission (verdict: Accepted):
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

Problem: p03971
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,A,B = map(int,input().split())
S  = input()
t,k = 0,0
for i in range(N):
    if S[i]=="a":
        if t < A+B:
            print("YES")
            t +=1
        else:
            print("NO")
    elif S[i]=="b":
        if t < A+B and k <B:
            print("YES")
            t += 1
            k += 1
        else:
            print("NO")
    else:
        print("NO")

Failing test case input:
5 2 2
ccbcc

Expected output:
No
No
Yes
No
No


Actual output:
NO
NO
YES
NO
NO


Fixed submission (verdict: Accepted):
N,A,B = map(int,input().split())
S  = input()
t,k = 0,0
for i in range(N):
    if S[i]=="a":
        if t < A+B:
            print("Yes")
            t +=1
        else:
            print("No")
    elif S[i]=="b":
        if t < A+B and k <B:
            print("Yes")
            t += 1
            k += 1
        else:
            print("No")
    else:
        print("No")
Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    quantity, A, B = map(int, input().split())
    l = list(input())
    ans = []
    
    for i in range(quantity):
        if l[i] == 'a' and ans.count('Yes') < (A + B):
            print('Yes')
            continue
        elif l[i] == 'b' and ans.count('Yes') < (A + B):
            check = 0
            for x in range(len(ans)):
                if ans[x] == 'Yes':
                    check = check + 1
            if check <= B:
                print('Yes')
                continue
        print('No')

main()

Failing test case input:
12 2 2
cabbabaacaca

Expected output:
No
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No


Actual output:
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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()

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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:
            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')


Failing test case input:
10 1 1
bbaacaccba

Expected output:
Yes
No
Yes
No
No
No
No
No
No
No


Actual output:
Yes
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
10 2 3
bbbabaccba

Expected output:
Yes
Yes
Yes
Yes
No
Yes
No
No
No
No


Actual output:
Yes
Yes
Yes
Yes
No
Yes
No
No
No


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())
s=input()
num=0
count=0
for i in s:
    if i=="a" and num<=a+b:
        num+=1
        print("Yes")
    elif i=="b" and num<=a+b and count<b:
        num+=1
        count+=1
        print("Yes")
    else:
        print("No")

Failing test case input:
12 6 0
cabbaaaacaba

Expected output:
No
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
No
No


Actual output:
No
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())
s=input()
cnt=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 <=b:
        print('Yes')
        cnt+=1
    elif s[i] == 'c':
        print('No')
    else:
        print('No')

Failing test case input:
10 2 0
bbaacaccca

Expected output:
No
No
Yes
Yes
No
No
No
No
No
No


Actual output:
Yes
No
Yes
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = list(map(int,input().split()))
A = i[1]
B = i[2]
people = input()
passp = 0
bp = 0
for p in people:
	if p == "a" and passp < A + B:
		print("Yes")
		passp += 1
	elif p == "b":
		bp += 1
		if passp <= A + B and bp < B:
			print("Yes")
			passp += 1
		else:
			print("No")
	else:
 		print("No")

Failing test case input:
10 2 3
bbbabaccba

Expected output:
Yes
Yes
Yes
Yes
No
Yes
No
No
No
No


Actual output:
Yes
Yes
No
Yes
No
Yes
No
No
No
Yes


Fixed submission (verdict: Accepted):
N,A,B = map(int,input().split())
student = input()
passp = 0
passb = 0
ab = (A+B)
for s in student:
	if s == "a":
		if passp < ab:
			passp += 1
			print("Yes")
		else:
			print("No")
	elif s == "b":
		if passp < ab and passb < B:
			passp += 1
			passb += 1
			print("Yes")
		else:
			print("No")
	else:
		print("No")

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, A, B = map(int, input().split())
S = input()
tol = 0
bcnt = 0
ans = []
for c in S:
    if c == 'a':
        if tol <= (A+B):
            tol += 1
            ans.append('Yes')
        else:
            ans.append('No')
    elif c == 'b':
        bcnt += 1
        if tol <= (A+B) and bcnt <= B:
            tol += 1
            ans.append('Yes')
        else:
            ans.append('No')
    else:
        ans.append('No')
        continue
for s in ans:
    print(s)

Failing test case input:
10 2 1
abccabaabb

Expected output:
Yes
Yes
No
No
Yes
No
No
No
No
No


Actual output:
Yes
Yes
No
No
Yes
No
Yes
No
No
No


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
S = input()
tol = 0
bcnt = 0
ans = []
for c in S:
    if c == 'a':
        if tol < (A+B):
            tol += 1
            ans.append('Yes')
        else:
            ans.append('No')
    elif c == 'b':
        bcnt += 1
        if tol < (A+B) and bcnt <= B:
            tol += 1
            ans.append('Yes')
        else:
            ans.append('No')
    else:
        ans.append('No')
        continue
for s in ans:
    print(s)

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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 AB<=b:
            AB+=1
            B+=1
            print('Yes')
        else:
            print('No')
    else:
        print('No')

Failing test case input:
12 7 2
caababaccaba

Expected output:
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes


Actual output:
No
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,a,b=map(int,input().split())
text=input()
num=0
f=1
for i in range(n):
  alp=text[i]
  print(type(alp))
  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")

Failing test case input:
10 1 0
abccabaabb

Expected output:
Yes
No
No
No
No
No
No
No
No
No


Actual output:
<class 'str'>
Yes
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No
<class 'str'>
No


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
s = list(input())
p = 0
ab = 0
for i in s:
  if i == "c":
    print("No")
  elif i == "a":
    if p < a + b:
      p += 1
      print("Yes")
  else:
    if p < a + b and ab < b:
      p += 1
      ab += 1
      print("Yes")

Failing test case input:
12 66 -1
abcbacaccaba

Expected output:
Yes
No
No
No
Yes
No
Yes
No
No
Yes
No
Yes


Actual output:
Yes
No
Yes
No
Yes
No
No
Yes
Yes


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
s = list(input())
p = 0
ab = 0
for i in s:
  if i == "c":
    print("No")
  elif i == "a":
    if p < a + b:
      p += 1
      print("Yes")
    else:
      print("No")
  else:
    if p < a + b and ab < b:
      p += 1
      ab += 1
      print("Yes")
    else:
      print("No")

Problem: p03971
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,a,b=map(int,input().split())
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')

Failing test case input:
12 3 1
aabccababaac

Expected output:
Yes
Yes
Yes
No
No
Yes
No
No
No
No
No
No


Actual output:
No
Yes
No
Yes
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())
s=input()
num=0
count=0
for i in s:
    if i=="a" and num<=a+b:
        num+=1
        count+=1
        print("Yes")
    elif i=="b" and num<=a+b and count<=b:
        num+=1
        count+=1
        print("Yes")
    else:
        print("No")

Failing test case input:
12 8 2
cacbabaacaba

Expected output:
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes


Actual output:
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')
  else:
    print('No')

Failing test case input:
12 7 1
abbccababaac

Expected output:
Yes
Yes
No
No
No
Yes
No
Yes
No
Yes
Yes
No


Actual output:
Yes
No
yes
No
No
No
Yes
No
No
Yes
No
No
Yes
No
Yes
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
S = list(input())

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

Failing test case input:
12 5 2
cabbabaacaba

Expected output:
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No

Actual output:
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No


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

a, b = 0, 0
for s in S:
    if s == 'a':
        if (a + b) < (A + B):
            print('Yes')
            a += 1
        else:
            print('No')
    elif s == 'b':
        if (a + b) < (A + B) and b < B:
            print('Yes')
            b += 1
        else:
            print('No')
    else:
        print('No')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int, input().split())
S=input().split()
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')

Failing test case input:
12 5 1
cacbabaacaba

Expected output:
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No
No


Actual output:
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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
    if f:
        print("Yes")
        c+=1
    else:
        print("No")
    f=False

Failing test case input:
12 6 2
cabbabaacaba

Expected output:
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes


Actual output:
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No


Fixed submission (verdict: Accepted):
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

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())
s=input()
nat=0
intnat=0
for i in range(n):
  if s[i]=="a":
    if nat<a+b:
      print("Yes")
      nat+=1
    else:
      print("No")
  elif i=="b":
    if nat<a+b and intnat<b:
      print("Yes")
      nat+=1
      intnat+=1
    else:
      print("No")
  else:
    print("No")

Failing test case input:
12 4 4
caababaccaba

Expected output:
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No


Actual output:
No
Yes
Yes
No
Yes
No
Yes
No
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
n,a,b=map(int,input().split())
s=input()
kakutei=0
kaigai=0
for i in range(n):
  if s[i]=="a":
    if kakutei < a+b:
      print("Yes")
      kakutei += 1
    else:
      print("No")
  elif s[i]=="b":
    if kakutei < a+b and kaigai < b:
      print("Yes")
      kakutei += 1
      kaigai += 1
    else:
      print("No")
  else:
    print("No")
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')


Failing test case input:
10 2 3
bbbabaccba

Expected output:
Yes
Yes
Yes
Yes
No
Yes
No
No
No
No


Actual output:
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, A, B = map(int, input().split())
S = input()
counta = 0
countb = 0
for s in S:
    if s =='a':
        counta += 1
        if counta + countb <= A + B:
            print('Yes')
        else:
            print('No')
    if s =='b':
        countb += 1
        if counta + countb <= A + B:
            if countb <= B:
                print('Yes')
            else:
                print('No')                
        else:
            print('No')
    if s=='c':
        print('No')


Failing test case input:
12 3 0
aabcbababaac

Expected output:
Yes
Yes
No
No
No
Yes
No
No
No
No
No
No


Actual output:
Yes
Yes
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
S = input()
counta = 0
countb = 0
for s in S:
    if s =='a':
        if counta + countb < A + B:
            counta += 1
            print('Yes')
        else:
            print('No')
    if s =='b':
        if counta + countb < A + B:
            if countb < B:
                countb += 1
                print('Yes')
            else:
                print('No')                
        else:
            print('No')
    if s=='c':
        print('No')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())
s=input()
num=0
count=0
for i in s:
    if i=="a" and num!=a+b:
        num+=1
        count+=1
        print("Yes")
    elif i=="b" and num!=a+b and count<=b:
        num+=1
        count+=1
        print("Yes")
    else:
        print("No")

Failing test case input:
12 8 3
cacbabaacaba

Expected output:
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes


Actual output:
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes


Fixed submission (verdict: Accepted):
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")
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inp=input().split()
N,A,B=[int(n) for n in inp]
S=input()

total=0
total2=0
for i,s in enumerate(S):
    if s=='a':
        if total<A+B:
            print('Yes')
        else:
            print('No')
        total +=1
    elif s=='b':
        if total<A+B and total2<=B:
            print('Yes')
            total2+=1
        else:
            print('No')
        total +=1
    else:
        print('No')


Failing test case input:
12 3 -1
abacbbaabaac

Expected output:
Yes
No
Yes
No
No
No
No
No
No
No
No
No


Actual output:
Yes
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
inp=input().split()
N,A,B=[int(n) for n in inp]
S=input()

total=0
total2=0
for i,s in enumerate(S):
    if s=='a':
        if total<A+B:
            print('Yes')
            total +=1
        else:
            print('No')
    elif s=='b':
        if total<A+B and total2<B:
            print('Yes')
            total2+=1
            total +=1
        else:
            print('No')
    else:
        print('No')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
12 7 1
abacaabbbbac

Expected output:
Yes
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
No


Actual output:
Yes
Yes
Yes
No
Yes
Yes
Yes
No
No
No
Yes
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
p = 0
n, a, b = map(int, input().split())
for i in input():
    if i == "a" and p > a+b:
        p += 1
        print("Yes")
    elif i == "b" and p > a+b and f > a+b:
        f += 1
        p += 1
        print("Yes")
    else:
        print("No")

Failing test case input:
12 8 4
abacaababcac

Expected output:
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No


Actual output:
No
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
p = 0
f = 0
n, a, b = map(int, input().split())
for i in input():
    if i == "a" and p < a+b:
        p += 1
        print("Yes")
    elif i == "b" and p < a+b and f < b:
        p += 1
        f += 1
        print("Yes")
    else:
        print("No")
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int,input().split())
S = input()
passed = 0
f_passed = 0
for s in S:
  if s == "a":
    if passed <= a + b:
      print("Yes")
      passed += 1
    else:
      print("No")
  elif s == "b":
    if passed <= a + b and f_passed <= b:
      print("Yes")
      passed += 1
      f_passed += 1
    else:
      print("No")
  else:
    print("No")

Failing test case input:
10 4 0
abccaaabbb

Expected output:
Yes
No
No
No
Yes
Yes
Yes
No
No
No


Actual output:
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No


Fixed submission (verdict: Accepted):
n,a,b = map(int,input().split())
S = input()
passed = 0
f_passed = 0
for s in S:
  if s == "a":
    if passed < a + b:
      print("Yes")
      passed += 1
    else:
      print("No")
  elif s == "b":
    if passed < a + b and f_passed + 1 <= b:
      print("Yes")
      passed += 1
      f_passed += 1
    else:
      print("No")
  else:
    print("No")

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
10 4 1
bbaacaccba

Expected output:
Yes
No
Yes
Yes
No
Yes
No
No
No
Yes


Actual output:
Yes
No
Yes
Yes
No
Yes
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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]))

Failing test case input:
12 6 2
cabbabaacaba

Expected output:
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes


Actual output:
NoYesYesNoYesNoYesYesNoYesNoYes


Fixed submission (verdict: Accepted):
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]))
Problem: p03971
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,a,b=map(int,input().split())
cnt_s = 0
cnt_b = 0

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

Failing test case input:
12 5 0
aabcbacabaab

Expected output:
Yes
Yes
No
No
No
Yes
No
Yes
No
Yes
No
No


Actual output:
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
12 9 2
abaccabababc

Expected output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
No


Actual output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
S =input()

x = 0
y = 0
for i in range(len(S)):
    if S[i] == "a":
        x += 1
        if x <= a + b:
            print("Yes")
        else:
            print("No")
    elif S[i] == "b":
        y += 1
        if (x <= a + b) and (y <= b):
            x += 1
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Failing test case input:
12 3 3
abaccababaac

Expected output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
No
No


Actual output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
No
No


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
S =input()

x = 1
y = 1
for i in range(len(S)):
    if S[i] == "a":
        if x <= a + b:
            print("Yes")
            x += 1
        else:
            print("No")
    elif S[i] == "b":
        if (x <= a + b) and (y <= b):
            print("Yes")
            x += 1
            y += 1
        else:
            print("No")
    else:
        print("No")

Problem: p03971
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,a,b=map(int,input().split())
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')
    

Failing test case input:
12 6 0
cabbaaaacaba

Expected output:
No
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
No
No


Actual output:
No
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
12 2 1
babbabaacaca

Expected output:
Yes
Yes
No
No
Yes
No
No
No
No
No
No
No


Actual output:
yes
Yes
No
No
Yes
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
12 9 2
abaccabababc

Expected output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
No


Actual output:
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
12 7 1
abacaabbbbac

Expected output:
Yes
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
No


Actual output:
Yes
Yes
Yes
No
Yes
Yes
Yes
No


Fixed submission (verdict: Accepted):
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")
Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')


Failing test case input:
10 4 0
abccaaabbb

Expected output:
Yes
No
No
No
Yes
Yes
Yes
No
No
No


Actual output:
Yes
No
Yes
No
No
Yes
No
Yes
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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')

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")
  if s[i]=="b":
    if c+1<=a+b and d+1<=b:
      print("Yes")
      c+=1
      d+=1
    else:
      print("No")
  else:
    print("No")

Failing test case input:
12 1 0
cacbabaacaba

Expected output:
No
Yes
No
No
No
No
No
No
No
No
No
No


Actual output:
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
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")

Problem: p03971
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,A,B=map(int,input().split())
s=list(input())
cnt=0
cnt_b=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_b<=B:
			print('Yes')
	else:
		print('No')

Failing test case input:
12 1 1
cabbabaacaba

Expected output:
No
Yes
Yes
No
No
No
No
No
No
No
No
No


Actual output:
No
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
n,A,B=map(int,input().split())
s=list(input())
cnt=0
cnt_b=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_b<B:
		print('Yes')
		cnt_b+=1
		cnt+=1
	else:
		print('No')