module String = struct
  include String
  let to_list s =
    let rec loop acc = function
      | 0 -> acc
      | n -> loop (s.[n - 1] :: acc) (n - 1) in
    loop [] (String.length s)
end

let () =
  let n, a, b = Scanf.scanf "%d %d %d\n" (fun n a b -> n, a, b) in
  let s = Scanf.scanf "%s\n" (fun s -> s) in
  String.to_list s
    |> List.fold_left (fun (accepted, foreigners) -> function
      | 'a' ->
          if accepted < a + b then begin
            print_endline "Yes";
            (accepted + 1, foreigners)
          end else begin
            print_endline "No";
            (accepted, foreigners)
          end
      | 'b' ->
          if accepted < a + b && foreigners < b then begin
            print_endline "Yes";
            (accepted + 1, foreigners + 1)
          end else begin
            print_endline "No";
            (accepted, foreigners + 1)
          end
      | 'c' -> print_endline "No"; (accepted, foreigners)) (0, 0)
    |> ignore