program sample
    implicit none
    real(8)::z
    integer(8) :: a,b,c,i,j,m,n,k,x,y
    character::s !文字列
    
  
    read(*,*)n,a,b

    read(*,*)s
    x=0
    y=0

    do i=1,n
        if (s(i:i)=='a')then
            if (x+y<a+b)then
                x=x+1
                write(*,*)'Yes'
            else
                write(*,*)'No'
            end if
        else if (s(i:i)=='b')then
            if (x+y<a+b)then
                if (y<b)then
                    y=y+1
                    write(*,*)'Yes'
                end if
            else
                write(*,*)'No'
            end if
           

        else
            write(*,*)'No'
        end if

    end do
    
    stop
end program sample
  

