#include<bits/stdc++.h>
#define int long long
#define mod 1e18+10
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
int32_t main() {
	int n,a,b;
	string s;
	cin>>n>>a>>b;
	cin>>s;
	for(auto c:s)
	{
		if(c=='c')
			cout<<"No\n";
		else if(c=='a')
		{
			if(a+b)
			{	cout<<"Yes\n";
				a--;
			}
			else cout<<"No\n";
		}
		else 
		{
			if(a+b && b)
			{	cout<<"Yes\n";
				b--;
			}
			else cout<<"No\n";
		}
	}
}	
