#import <stdio.h>
int main(){
    int h,w;
    scanf("%d %d",&h,&w);
    for(int i=0;i<=w+1;i++){
        printf("#");
    }
    printf("\n");
    for(int i=0;i<h;i++){
        char s[105] = {'\0'};
        scanf("%s",s);
        printf("#%s#\n",s);
    }
    for(int i=0;i<=w+1;i++){
        printf("#");
    }
    printf("\n");
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_782/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_782/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 [6 x i8] c"%d %d\00", align 1
@.str.3 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.4 = private unnamed_addr constant [6 x i8] c"#%s#\0A\00", align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
  %h = alloca i32, align 4
  %w = alloca i32, align 4
  %s = alloca [105 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #5
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
  %0 = load i32, ptr %w, align 4, !tbaa !5
  %cmp.not32 = icmp slt i32 %0, -1
  br i1 %cmp.not32, label %for.cond.cleanup, label %for.body

for.cond.cleanup:                                 ; preds = %for.body, %entry
  %putchar = call i32 @putchar(i32 10)
  %1 = load i32, ptr %h, align 4, !tbaa !5
  %cmp534 = icmp sgt i32 %1, 0
  br i1 %cmp534, label %for.body7, label %for.cond15.preheader

for.body:                                         ; preds = %entry, %for.body
  %i.033 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
  %putchar30 = call i32 @putchar(i32 35)
  %inc = add nuw nsw i32 %i.033, 1
  %2 = load i32, ptr %w, align 4, !tbaa !5
  %cmp.not = icmp sgt i32 %i.033, %2
  br i1 %cmp.not, label %for.cond.cleanup, label %for.body

for.cond15.preheader:                             ; preds = %for.body7, %for.cond.cleanup
  %3 = load i32, ptr %w, align 4, !tbaa !5
  %cmp17.not37 = icmp slt i32 %3, -1
  br i1 %cmp17.not37, label %for.cond.cleanup18, label %for.body19

for.body7:                                        ; preds = %for.cond.cleanup, %for.body7
  %i3.035 = phi i32 [ %inc12, %for.body7 ], [ 0, %for.cond.cleanup ]
  call void @llvm.lifetime.start.p0(i64 105, ptr nonnull %s) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(105) %s, i8 0, i64 105, i1 false)
  %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %s)
  %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %s)
  call void @llvm.lifetime.end.p0(i64 105, ptr nonnull %s) #5
  %inc12 = add nuw nsw i32 %i3.035, 1
  %4 = load i32, ptr %h, align 4, !tbaa !5
  %cmp5 = icmp slt i32 %inc12, %4
  br i1 %cmp5, label %for.body7, label %for.cond15.preheader

for.cond.cleanup18:                               ; preds = %for.body19, %for.cond15.preheader
  %putchar28 = call i32 @putchar(i32 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #5
  ret i32 0

for.body19:                                       ; preds = %for.cond15.preheader, %for.body19
  %i14.038 = phi i32 [ %inc22, %for.body19 ], [ 0, %for.cond15.preheader ]
  %putchar29 = call i32 @putchar(i32 35)
  %inc22 = add nuw nsw i32 %i14.038, 1
  %5 = load i32, ptr %w, align 4, !tbaa !5
  %cmp17.not = icmp sgt i32 %i14.038, %5
  br i1 %cmp17.not, label %for.cond.cleanup18, label %for.body19
}

; 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 @printf(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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nofree nounwind }
attributes #5 = { 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"}
