unittest
{
	assert( [ "10 2 3", "abccabaabb" ].parse.expand.solve == "Yes\nYes\nNo\nNo\nYes\nYes\nYes\nNo\nNo\nNo" );
	assert( [ "12 5 2", "cabbabaacaba" ].parse.expand.solve == "No\nYes\nYes\nYes\nYes\nNo\nYes\nYes\nNo\nYes\nNo\nNo" );
	assert( [ "5 2 2", "ccccc" ].parse.expand.solve == "No\nNo\nNo\nNo\nNo" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nab = input.front.split.to!( long[] );
	input.popFront;
	auto s = input.front.to!( dchar[] );
	return tuple( nab[ 0 ], nab[ 1 ], nab[ 2 ], s );
}

auto solve( long n, long a, long b, dchar[] s )
{
	auto anss = new string[ n ];
	auto at = 0L;
	auto bt = 0L;
	foreach( ref ans, r; lockstep( anss, s ) )
	{
		final switch( r )
		{
			case 'a':
				if( at + bt < a + b ) ans = "Yes", at++;
				else                  ans = "No";
				break;
			
			case 'b':
				if( at + bt < a + b && bt < b ) ans = "Yes", bt++;
				else                            ans = "No";
				break;
			
			case 'c':
				ans = "No";
				break;
		}
	}
	return anss.join( "\n" );
}
