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