main = do
 [n,a,b] <- map read . words <$> getLine
 s <- getLine
 mapM_ putStrLn (sim s (a+b) b)

sim :: String -> Int -> Int -> [String]
sim [] _ _ = []
sim ('a':s) ab b
 | ab > 0 = "Yes" : sim s (ab-1) b
 | otherwise = "No" : sim s (ab-1) b
sim ('b':s) ab b
 | ab > 0 && b > 0 = "Yes" : sim s (ab-1) (b-1)
 | otherwise = "No" : sim s ab (b-1)
sim ('c':s) ab b = "No" : sim s ab b