#import <stdio.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
int main() {
    int n, a, b;
    scanf("%d %d %d ", &n, &a, &b);
    char s[1000001];
    scanf("%s", s);
    int totalcount = 0;
    int bcount = 0;
    rep(i, n) {
        switch (s[i]) {
        case 'a':
            if (totalcount < a + b) {
                totalcount++;
                puts("Yes");
                break;
            }
        case 'b':
            bcount++;
            if (totalcount < a + b && bcount <= b) {
                totalcount++;
                puts("Yes");
                break;
            }
        default:
            puts("No");
            break;
        }
    }
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_897/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_897/source.m"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@.str = private unnamed_addr constant [10 x i8] c"%d %d %d \00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
  %n = alloca i32, align 4
  %a = alloca i32, align 4
  %b = alloca i32, align 4
  %s = alloca [1000001 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b)
  call void @llvm.lifetime.start.p0(i64 1000001, ptr nonnull %s) #3
  %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
  %0 = load i32, ptr %n, align 4, !tbaa !5
  %cmp24 = icmp sgt i32 %0, 0
  br i1 %cmp24, label %for.body.preheader, label %for.cond.cleanup

for.body.preheader:                               ; preds = %entry
  %wide.trip.count = zext i32 %0 to i64
  br label %for.body

for.cond.cleanup:                                 ; preds = %for.inc, %entry
  call void @llvm.lifetime.end.p0(i64 1000001, ptr nonnull %s) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
  ret i32 0

for.body:                                         ; preds = %for.body.preheader, %for.inc
  %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.inc ]
  %totalcount.027 = phi i32 [ 0, %for.body.preheader ], [ %totalcount.1, %for.inc ]
  %bcount.025 = phi i32 [ 0, %for.body.preheader ], [ %bcount.2, %for.inc ]
  %arrayidx = getelementptr inbounds [1000001 x i8], ptr %s, i64 0, i64 %indvars.iv
  %1 = load i8, ptr %arrayidx, align 1, !tbaa !9
  %conv = sext i8 %1 to i32
  switch i32 %conv, label %for.inc [
    i32 97, label %sw.bb
    i32 98, label %for.body.sw.bb5_crit_edge
  ]

for.body.sw.bb5_crit_edge:                        ; preds = %for.body
  %.pre = load i32, ptr %a, align 4, !tbaa !5
  %.pre29 = load i32, ptr %b, align 4, !tbaa !5
  %.pre30 = add nsw i32 %.pre29, %.pre
  br label %sw.bb5

sw.bb:                                            ; preds = %for.body
  %2 = load i32, ptr %a, align 4, !tbaa !5
  %3 = load i32, ptr %b, align 4, !tbaa !5
  %add = add nsw i32 %3, %2
  %cmp2 = icmp slt i32 %totalcount.027, %add
  br i1 %cmp2, label %if.then, label %sw.bb5

if.then:                                          ; preds = %sw.bb
  %inc = add nsw i32 %totalcount.027, 1
  br label %for.inc

sw.bb5:                                           ; preds = %for.body.sw.bb5_crit_edge, %sw.bb
  %add7.pre-phi = phi i32 [ %.pre30, %for.body.sw.bb5_crit_edge ], [ %add, %sw.bb ]
  %4 = phi i32 [ %.pre29, %for.body.sw.bb5_crit_edge ], [ %3, %sw.bb ]
  %inc6 = add nsw i32 %bcount.025, 1
  %cmp8 = icmp slt i32 %totalcount.027, %add7.pre-phi
  %cmp10.not.not = icmp slt i32 %bcount.025, %4
  %or.cond = select i1 %cmp8, i1 %cmp10.not.not, i1 false
  %spec.select = select i1 %or.cond, ptr @.str.2, ptr @.str.3
  %inc13 = zext i1 %or.cond to i32
  %spec.select31 = add nsw i32 %totalcount.027, %inc13
  br label %for.inc

for.inc:                                          ; preds = %sw.bb5, %for.body, %if.then
  %.str.2.sink = phi ptr [ @.str.2, %if.then ], [ @.str.3, %for.body ], [ %spec.select, %sw.bb5 ]
  %bcount.2 = phi i32 [ %bcount.025, %if.then ], [ %bcount.025, %for.body ], [ %inc6, %sw.bb5 ]
  %totalcount.1 = phi i32 [ %inc, %if.then ], [ %totalcount.027, %for.body ], [ %spec.select31, %sw.bb5 ]
  %call4 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
