judge :: Integral a => a -> a -> String -> [Bool]
judge a b = f 0 0
    where
        f _ _ [] = []
        f c d (x : xs)
            | x == 'a' && c < a + b = True : f (c + 1) d xs
            | x == 'b' && c < a + b && d < b = True : f (c + 1) (d + 1) xs
            | otherwise = False : f c d xs

main :: IO ()
main = do
    [_, a, b] <- fmap read . words <$> getLine :: IO [Int]
    xs <- getLine
    putStr . unlines . fmap (\x -> if x then "Yes" else "No") $ judge a b xs
