program main
	implicit none
	integer(8):: N,i,j,t,k
	character a*100, b*100,d*3
	read *, N
	read *, a
    d="..."
	if(len_trim(a)<=N)print'(a)',a
	
	if(len_trim(a)>N)then
	b(1:N)=a(1:N)
	b(N+1:N+3)=d(1:3)
	print'(a)',b(1:N+3)
	end if
	
end program main
; 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"

@_QFEa = internal global [100 x i8] undef
@_QFEb = internal global [100 x i8] undef
@_QQcl.05b6f63b63f7945df92366521a4a416f = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1371/source.f\00"
@_QQcl.2E2E2E = linkonce local_unnamed_addr constant [3 x i8] c"..."
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.05b6f63b63f7945df92366521a4a416f, i32 5)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 8)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.05b6f63b63f7945df92366521a4a416f, i32 6)
  %6 = call i1 @_FortranAioInputAscii(ptr %5, ptr nonnull @_QFEa, i64 100)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  br label %8

8:                                                ; preds = %0, %8
  %9 = phi i64 [ 99, %0 ], [ %13, %8 ]
  %10 = getelementptr [100 x [1 x i8]], ptr @_QFEa, i64 0, i64 %9
  %11 = load i8, ptr %10, align 1, !tbaa !3
  %12 = icmp eq i8 %11, 32
  %13 = add nsw i64 %9, -1
  %14 = icmp ne i64 %9, 0
  %15 = and i1 %12, %14
  br i1 %15, label %8, label %16

16:                                               ; preds = %8
  %17 = shl i64 %9, 32
  %sext = add i64 %17, 4294967296
  %18 = ashr exact i64 %sext, 32
  %19 = select i1 %12, i64 0, i64 %18
  %20 = load i64, ptr %1, align 8, !tbaa !3
  %.not = icmp sgt i64 %19, %20
  br i1 %.not, label %.preheader.preheader, label %21

21:                                               ; preds = %16
  %22 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.05b6f63b63f7945df92366521a4a416f, i32 8)
  %23 = call i1 @_FortranAioOutputAscii(ptr %22, ptr nonnull @_QFEa, i64 100)
  %24 = call i32 @_FortranAioEndIoStatement(ptr %22)
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %16, %21
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %25 = phi i64 [ %29, %.preheader ], [ 99, %.preheader.preheader ]
  %26 = getelementptr [100 x [1 x i8]], ptr @_QFEa, i64 0, i64 %25
  %27 = load i8, ptr %26, align 1, !tbaa !3
  %28 = icmp eq i8 %27, 32
  %29 = add nsw i64 %25, -1
  %30 = icmp ne i64 %25, 0
  %31 = and i1 %28, %30
  br i1 %31, label %.preheader, label %32

32:                                               ; preds = %.preheader
  %33 = shl i64 %25, 32
  %sext5 = add i64 %33, 4294967296
  %34 = ashr exact i64 %sext5, 32
  %35 = select i1 %28, i64 0, i64 %34
  %36 = load i64, ptr %1, align 8, !tbaa !3
  %37 = icmp sgt i64 %35, %36
  br i1 %37, label %38, label %47

38:                                               ; preds = %32
  %39 = call i64 @llvm.smax.i64(i64 %36, i64 0)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @_QFEb, ptr nonnull align 16 @_QFEa, i64 %39, i1 false)
  %40 = getelementptr [100 x [1 x i8]], ptr @_QFEb, i64 0, i64 %36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %40, ptr noundef nonnull align 1 dereferenceable(3) @_QQcl.2E2E2E, i64 3, i1 false)
  %41 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.05b6f63b63f7945df92366521a4a416f, i32 13)
  %42 = load i64, ptr %1, align 8, !tbaa !3
  %43 = add i64 %42, 3
  %44 = call i64 @llvm.smax.i64(i64 %43, i64 0)
  %45 = call i1 @_FortranAioOutputAscii(ptr %41, ptr nonnull @_QFEb, i64 %44)
  %46 = call i32 @_FortranAioEndIoStatement(ptr %41)
  br label %47

47:                                               ; preds = %38, %32
  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 i1 @_FortranAioInputAscii(ptr, ptr, i64) local_unnamed_addr

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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"}
