let n, a, b, s = Scanf.scanf " %d %d %d %s" @@ fun a b c d -> a, b, c, d
let p, r = ref 0, ref 0
let f b = print_endline @@ if b then (incr p; "Yes") else "No"
let _ = String.iter (function 'a' -> f (!p < a + b) | 'b' -> incr r; f (!p < a + b && !r <= b) | _ -> f false) s