Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int, input().split())
s=list(input())
num=0
qual=[]
s_b=[i for i,x in enumerate(s) if x=='b']
for i in range(n):
  if num<a+b:
    if s[i]=='c':
      qual.append('No')
    elif s[i]=='a':
      num+=1
      qual.append('Yes')     
    else:
      if s_b.index(i)<b:
        num+=1
        qual.append('Yes')
      else:
        qual.append('No')   
  else:
    qual.append('No')
for j in range(n):
  print(qual[j])

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int, input().split())
s=list(input())
num=0
qual=[]
s_b=[i for i,x in enumerate(s) if x=='b']
for i in range(n):
  if num<a+b:
    if s[i]=='c':
      qual.append('No')
    elif s[i]=='a':
      num+=1
      qual.append('Yes')     
    else:
      if s_b.index(i)<b:
        num+=1
        qual.append('Yes')
      else:
        qual.append('No')   
  else:
    qual.append('No')
for j in range(n):
  print(qual[j])

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int, input().split())
s=list(input())
num=0
qual=[]
s_b=[i for i,x in enumerate(s) if x=='b']
for i in range(n):
  if num<a+b:
    if s[i]=='c':
      qual.append('No')
    elif s[i]=='a':
      num+=1
      qual.append('Yes')     
    else:
      if s_b.index(i)<b:
        num+=1
        qual.append('Yes')
      else:
        qual.append('No')   
  else:
    qual.append('No')
print(qual, split='\n')

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int, input().split())
s=list(input())
num=0
s_b=[i for i,x in enumerate(s) if x=='b']
for i in range(n):
  if num<a+b:
    if s[i]=='c':
      print('No')
    elif s[i]=='a':
      num+=1
      print('Yes')     
    else:
      if s_b.index(i)<b:
        num+=1
        print('Yes')
      else:
        print('No')   
  else:
    print('No')

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b=map(int, input().split())
s=list(input())
num=0
s_b=[i for i,x in enumerate(s) if x=='b']
for i in range(n):
  if num<a+b:
    if s[i]=='c':
      print('No')
    elif s[i]=='a':
      num+=1
      print('Yes')     
    else:
      if s_b.index(i)<b:
        num+=1
        print('Yes')
      else:
        print('No')   
  else:
    print('No')

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int, input().split())
s=input()
num=0
s_b=[i for i,x in s if x=='b']
for i in range(n):
  if s[i]=='c':
    print('No')
  elif s[i]=='a':
    if i <=(a+b):
      num+=1
      print('Yes')
    else:
      print('No')
  else:
    if s_b.index(i)<=b:
      num+=1
      print('Yes')
    else:
      print('No')   
  if num==a+b:
    break
    

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int, input().split())
s=list(input())
num=0
s_b=[i for i,x in s if x=='b']
for i in range(n):
  if s[i]=='c':
    print('No')
  elif s[i]=='a':
    if i <=(a+b):
      num+=1
      print('Yes')
    else:
      print('No')
  else:
    if s_b.index(i)<=b:
      num+=1
      print('Yes')
    else:
      print('No')   
  if num==a+b:
    break
    

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int, input().split())
s=list(map(input().split()))
num=0
s_b=[i for i,x in s if x=='b']
for i in range(n):
  if s[i]=='c':
    print('No')
  elif s[i]=='a':
    if i <=(a+b):
      num+=1
      print('Yes')
    else:
      print('No')
  else:
    if s_b.index(i)<=b:
      num+=1
      print('Yes')
    else:
      print('No')   
  if num==a+b:
    break
    

Fixed submission:
n,a,b=map(int, input().split())
s=list(input())
num=0
num_f=0
qual=[]
for i in range(n):
  if num<a+b:
    if s[i]=='a':
      num+=1
      qual.append('Yes')     
    elif s[i]=='b' and num_f<b:
      num+=1
      num_f+=1
      qual.append('Yes')
    else:
      qual.append('No')   
  else:
    qual.append('No')
for i in range(n):
  print(qual[i])