program codefestival2016qualb
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: n,a,b,i
    integer(int32):: qualifier, foregin_qualifier
    character(:),allocatable:: s

    read*, n,a,b
    allocate(character(n):: s)
    read*, s
    qualifier = 0
    foregin_qualifier = 0

    do i=1,n
        if (qualifier >= a+b) then
            print'(a)', 'No'
            cycle
        end if
        
        if (s(i:i) == 'a') then
            print'(a)', 'Yes'
            qualifier=qualifier+1
        else if (s(i:i) == 'b') then
            if (foregin_qualifier >= b) then
                print'(a)', 'No'
            else
                print'(a)', 'Yes'
                qualifier=qualifier+1
                foregin_qualifier=foregin_qualifier+1
            end if
        else
            print'(a)', 'No'
        end if
    end do
end program codefestival2016qualb