{-# LANGUAGE BangPatterns #-}

import           Data.Bifunctor (bimap, first, second)
import qualified Data.List      as L

main :: IO ()
main = do
    [_, a, b] <- fmap read . words <$> getLine
    s         <- getLine
    answer $ solve a b s

type Answer = [Bool]
answer :: Answer -> IO ()
answer = mapM_ (putStrLn . \x -> if x then "Yes" else "No")

solve :: Int -> Int -> String -> Answer
solve a b = (\(_, _, c) -> c []) . L.foldl' f (0, 0, id)
  where
    f (!x, !y, !c) 'a'
      | x < a + b = (succ x, y, c . (True  :))
      | otherwise = (     x, y, c . (False :))
    f (!x, !y, !c) 'b'
      | y < b && x < a + b = (succ x, succ y, c . (True  :))
      | otherwise          = (     x,      y, c . (False :))
    f (!x, !y, !c) 'c'     = (     x,      y, c . (False :))

