import Control.Monad.State
main = do
  [n,a,b] <-map read.words<$>getLine
  s <- getLine 
  let res = evalState (ans (a,b) s) (0,0)
  (mapM putStrLn) res

type St = (Int,Int)

solve :: St -> Char -> State St String
solve (a,b) 'a' =
  state (\(jpn,wld) ->
  if jpn+wld < a+b
    then ("Yes",(jpn+1,wld))
    else ("No",(jpn,wld)))
solve (a,b) 'b' =
  state (\(jpn,wld) ->
  if jpn+wld < a+b && wld < b
    then ("Yes",(jpn,wld+1))
    else ("No",(jpn,wld)))
solve _ 'c' =
  state (\s -> ("No",s))


ans :: St -> [Char] -> State St [String]
ans s [] = return []
ans s (fc:sc) = 
  solve s fc >>= (\x -> ans s sc >>= (\y -> return (x:y)))
