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 _ = String.iter (fun c -> print_endline @@ if !p < a + b then if c = 'a' then (incr p; "Yes") else if c = 'b' then (incr r; if !r <= b then (incr p; "Yes") else "No") else "No" else "No") s