open Batteries

let read_two () = Scanf.sscanf (read_line ()) "%d %d" (fun a b -> (a, b))

let read_three () =
  Scanf.sscanf (read_line ()) "%d %d %d" (fun a b c -> (a, b, c))

let read_four () =
  Scanf.sscanf (read_line ()) "%d %d %d" (fun a b c d -> (a, b, c, d))

let () =
  let n, a, b = read_three () in
  let s = read_line () in
  let cur_b = ref 0 and cur_a = ref 0 in
  for i = 1 to n do
    let c = s.[i - 1] in
    if !cur_b + !cur_a < a + b then
      match c with
      | 'a' ->
          cur_a := !cur_a + 1;
          print_string "Yes\n"
      | 'b' ->
          if !cur_b < b then (
            cur_b := !cur_b + 1;
            print_string "Yes\n" )
          else print_string "No\n"
      | _ -> print_string "No\n"
    else print_string "No\n"
  done
