program key2020_C
    implicit none
    integer::N,K,S
    integer::i
    read*,N,K,S
    if(K/=0)then
        write(*,"(i0)",advance="no")S
    else
        write(*,"(i0)",advance="no")merge(S+1,S-1,S/=10**9)
    endif
    do i=2,K
        write(*,"(A,i0)",advance="no")" ",S
    end do
    do i=K+1,N
        if(K==0.and.i==N)exit
         write(*,"(A,i0)",advance="no")" ",merge(S+1,S-1,S/=10**9)
    end do
    write(*,*)
end program key2020_C
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
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"

@_QQcl.0515bbc91959ca6a1ec97d782b66306d = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2608/source.f\00"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_QQcl.6E6F = linkonce constant [2 x i8] c"no"
@_QQcl.28412C693029 = linkonce constant [6 x i8] c"(A,i0)"
@_QQcl.20 = linkonce constant [1 x i8] c" "
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0515bbc91959ca6a1ec97d782b66306d, i32 5)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %1, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %9 = load i32, ptr %1, align 4, !tbaa !3
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %15, label %10

10:                                               ; preds = %0
  %11 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.0515bbc91959ca6a1ec97d782b66306d, i32 7)
  %12 = call i1 @_FortranAioSetAdvance(ptr %11, ptr nonnull @_QQcl.6E6F, i64 2)
  %13 = load i32, ptr %3, align 4, !tbaa !3
  %14 = call i1 @_FortranAioOutputInteger32(ptr %11, i32 %13)
  br label %22

15:                                               ; preds = %0
  %16 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.0515bbc91959ca6a1ec97d782b66306d, i32 9)
  %17 = call i1 @_FortranAioSetAdvance(ptr %16, ptr nonnull @_QQcl.6E6F, i64 2)
  %18 = load i32, ptr %3, align 4, !tbaa !3
  %19 = add i32 %18, 1
  %.not7 = icmp eq i32 %18, 1000000000
  %20 = select i1 %.not7, i32 999999999, i32 %19
  %21 = call i1 @_FortranAioOutputInteger32(ptr %16, i32 %20)
  br label %22

22:                                               ; preds = %10, %15
  %.sink = phi ptr [ %11, %10 ], [ %16, %15 ]
  %23 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  %24 = load i32, ptr %1, align 4, !tbaa !3
  %25 = icmp sgt i32 %24, 1
  br i1 %25, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %22
  %26 = zext i32 %24 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.in = phi i64 [ %27, %.lr.ph ], [ %26, %.lr.ph.preheader ]
  %27 = add nsw i64 %.in, -1
  %28 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28412C693029, i64 6, ptr null, i32 -1, ptr nonnull @_QQcl.0515bbc91959ca6a1ec97d782b66306d, i32 12)
  %29 = call i1 @_FortranAioSetAdvance(ptr %28, ptr nonnull @_QQcl.6E6F, i64 2)
  %30 = call i1 @_FortranAioOutputAscii(ptr %28, ptr nonnull @_QQcl.20, i64 1)
  %31 = load i32, ptr %3, align 4, !tbaa !3
  %32 = call i1 @_FortranAioOutputInteger32(ptr %28, i32 %31)
  %33 = call i32 @_FortranAioEndIoStatement(ptr %28)
  %34 = icmp ugt i64 %.in, 2
  br i1 %34, label %.lr.ph, label %._crit_edge.loopexit

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %1, align 4, !tbaa !3
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %22
  %35 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %24, %22 ]
  %36 = load i32, ptr %2, align 4, !tbaa !3
  %37 = sub i32 %36, %35
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph12, label %._crit_edge13

.lr.ph12:                                         ; preds = %._crit_edge, %44
  %.010.in = phi i32 [ %.010, %44 ], [ %35, %._crit_edge ]
  %.059 = phi i32 [ %53, %44 ], [ %37, %._crit_edge ]
  %.010 = add i32 %.010.in, 1
  %39 = load i32, ptr %1, align 4, !tbaa !3
  %40 = icmp eq i32 %39, 0
  %41 = load i32, ptr %2, align 4, !tbaa !3
  %42 = icmp eq i32 %.010, %41
  %43 = and i1 %40, %42
  br i1 %43, label %._crit_edge13, label %44

44:                                               ; preds = %.lr.ph12
  %45 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28412C693029, i64 6, ptr null, i32 -1, ptr nonnull @_QQcl.0515bbc91959ca6a1ec97d782b66306d, i32 16)
  %46 = call i1 @_FortranAioSetAdvance(ptr %45, ptr nonnull @_QQcl.6E6F, i64 2)
  %47 = call i1 @_FortranAioOutputAscii(ptr %45, ptr nonnull @_QQcl.20, i64 1)
  %48 = load i32, ptr %3, align 4, !tbaa !3
  %49 = add i32 %48, 1
  %.not8 = icmp eq i32 %48, 1000000000
  %50 = select i1 %.not8, i32 999999999, i32 %49
  %51 = call i1 @_FortranAioOutputInteger32(ptr %45, i32 %50)
  %52 = call i32 @_FortranAioEndIoStatement(ptr %45)
  %53 = add nsw i32 %.059, -1
  %54 = icmp sgt i32 %.059, 1
  br i1 %54, label %.lr.ph12, label %._crit_edge13

._crit_edge13:                                    ; preds = %44, %.lr.ph12, %._crit_edge
  %55 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0515bbc91959ca6a1ec97d782b66306d, i32 18)
  %56 = call i32 @_FortranAioEndIoStatement(ptr %55)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioSetAdvance(ptr, ptr, i64) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
