program am
implicit none
integer::N,A,B
character(10**5)::S
integer::CNT=0,CNTB=0

integer::i
read*,N,A,B
read*,S
do i=1,N
    select case(S(i:i))
    case("a")
        print"(A)",trim(merge("Yes","No ",CNT<A+B))
        CNT=CNT+1
    case("b")
        print"(A)",trim(merge("Yes","No ",CNT<A+B.and.CNTB<B))
        if(CNT<A+B.and.CNTB<B)CNT=CNT+1
        CNTB=CNTB+1
    case default
        print"(A)","No"
    end select
end do

end program am