#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,a,b;
  string s;
  cin >> n >> a >> b >> s;
  int sum=0; int q=0;
  for(int i=0;i<s.size();i++){
    if(s[i]=='c'){cout << "No" << endl;}
    else if(s[i]=='a'){
      if(sum<a+b){cout << "Yes" << endl; sum++;}
      else{cout << "No" << endl;}
    }
    else{
      if(sum<a+b && q<b){cout << "Yes" << endl; sum++; q++;}
      else{cout << "No" << endl;}
    }
  }
}