program one_quadrillion_and_one_dalmatians
  implicit none
  integer(8) :: n
  integer :: i = 0, k(20) = 0
  read(*,*) n
  do while (n > 0)
    i = i + 1
    k(i) = int(mod(n - 1, 26) + 97)
    n = (n - 1)/ 26
  end do
  do while (i > 0)
    write(*,'(a)',advance='no') achar(k(i))
    i = i - 1
  end do
  write(*,*)
end program one_quadrillion_and_one_dalmatians
; 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"

@_QFEi = internal unnamed_addr global i32 0
@_QFEk = internal unnamed_addr global [20 x i32] zeroinitializer
@_QQcl.b94f15342fd3fc6253b3e82db1470598 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1127/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.6E6F = linkonce constant [2 x i8] c"no"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca [1 x i8], align 1
  %2 = alloca i64, align 8
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.b94f15342fd3fc6253b3e82db1470598, i32 5)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 8)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %.pr = load i64, ptr %2, align 8, !tbaa !3
  %_QFEi.promoted = load i32, ptr @_QFEi, align 4, !tbaa !3
  %6 = icmp sgt i64 %.pr, 0
  br i1 %6, label %.lr.ph, label %thread-pre-split

.lr.ph:                                           ; preds = %0, %.lr.ph
  %7 = phi i64 [ %17, %.lr.ph ], [ %.pr, %0 ]
  %8 = phi i32 [ %9, %.lr.ph ], [ %_QFEi.promoted, %0 ]
  %9 = add i32 %8, 1
  %10 = add nsw i64 %7, -1
  %11 = urem i64 %10, 26
  %12 = trunc i64 %11 to i32
  %13 = add nuw nsw i32 %12, 97
  %14 = sext i32 %9 to i64
  %15 = add nsw i64 %14, -1
  %16 = getelementptr [20 x i32], ptr @_QFEk, i64 0, i64 %15
  store i32 %13, ptr %16, align 4, !tbaa !3
  %17 = udiv i64 %10, 26
  %.not = icmp ult i64 %10, 26
  br i1 %.not, label %.thread-pre-split_crit_edge, label %.lr.ph

.thread-pre-split_crit_edge:                      ; preds = %.lr.ph
  store i32 %9, ptr @_QFEi, align 4, !tbaa !3
  store i64 %17, ptr %2, align 8, !tbaa !3
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %.thread-pre-split_crit_edge, %0
  %.pr1 = phi i32 [ %9, %.thread-pre-split_crit_edge ], [ %_QFEi.promoted, %0 ]
  %18 = icmp sgt i32 %.pr1, 0
  br i1 %18, label %.lr.ph3, label %._crit_edge

.lr.ph3:                                          ; preds = %thread-pre-split, %.lr.ph3
  %19 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.b94f15342fd3fc6253b3e82db1470598, i32 12)
  %20 = call i1 @_FortranAioSetAdvance(ptr %19, ptr nonnull @_QQcl.6E6F, i64 2)
  %21 = load i32, ptr @_QFEi, align 4, !tbaa !3
  %22 = sext i32 %21 to i64
  %23 = add nsw i64 %22, -1
  %24 = getelementptr [20 x i32], ptr @_QFEk, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !3
  %26 = trunc i32 %25 to i8
  store i8 %26, ptr %1, align 1, !tbaa !3
  %27 = call i1 @_FortranAioOutputAscii(ptr %19, ptr nonnull %1, i64 1)
  %28 = call i32 @_FortranAioEndIoStatement(ptr %19)
  %29 = load i32, ptr @_QFEi, align 4, !tbaa !3
  %30 = add i32 %29, -1
  store i32 %30, ptr @_QFEi, align 4, !tbaa !3
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph3, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph3, %thread-pre-split
  %32 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.b94f15342fd3fc6253b3e82db1470598, i32 15)
  %33 = call i32 @_FortranAioEndIoStatement(ptr %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 ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioSetAdvance(ptr, ptr, i64) 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"}
