program main
  implicit none
  character(len=10) :: S
  integer :: y
  integer :: m
  integer :: d
  read(*,'(A)') S
  
  read(S(1:4),*) y
  read(S(6:7),*) m
  read(S(9:10),*) d
  
  if ( m >= 5 ) then
     write(*,*) 'TBD'
  else 
     write(*,*) 'Heisei'
  end if
  stop
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"

@_QQcl.284129 = linkonce constant [3 x i8] c"(A)"
@_QQcl.4622371e594d6758a4ba70ef94a3a7d7 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4856/source.f\00"
@_QQcl.544244 = linkonce constant [3 x i8] c"TBD"
@_QQcl.486569736569 = linkonce constant [6 x i8] c"Heisei"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [10 x i8], align 1
  %4 = alloca i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalFormattedInput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.4622371e594d6758a4ba70ef94a3a7d7, i32 7)
  %6 = call i1 @_FortranAioInputAscii(ptr %5, ptr nonnull %3, i64 10)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %8 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %3, i64 4, ptr null, i64 0, ptr nonnull @_QQcl.4622371e594d6758a4ba70ef94a3a7d7, i32 9)
  %9 = call i1 @_FortranAioInputInteger(ptr %8, ptr nonnull %4, i32 4)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %8)
  %11 = getelementptr inbounds [10 x [1 x i8]], ptr %3, i64 0, i64 5
  %12 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %11, i64 2, ptr null, i64 0, ptr nonnull @_QQcl.4622371e594d6758a4ba70ef94a3a7d7, i32 10)
  %13 = call i1 @_FortranAioInputInteger(ptr %12, ptr nonnull %2, i32 4)
  %14 = call i32 @_FortranAioEndIoStatement(ptr %12)
  %15 = getelementptr inbounds [10 x [1 x i8]], ptr %3, i64 0, i64 8
  %16 = call ptr @_FortranAioBeginInternalListInput(ptr nonnull %15, i64 2, ptr null, i64 0, ptr nonnull @_QQcl.4622371e594d6758a4ba70ef94a3a7d7, i32 11)
  %17 = call i1 @_FortranAioInputInteger(ptr %16, ptr nonnull %1, i32 4)
  %18 = call i32 @_FortranAioEndIoStatement(ptr %16)
  %19 = load i32, ptr %2, align 4, !tbaa !3
  %20 = icmp sgt i32 %19, 4
  %. = select i1 %20, i32 14, i32 16
  %.3 = select i1 %20, i64 3, i64 6
  %_QQcl.544244._QQcl.486569736569 = select i1 %20, ptr @_QQcl.544244, ptr @_QQcl.486569736569
  %21 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.4622371e594d6758a4ba70ef94a3a7d7, i32 %.)
  %22 = call i1 @_FortranAioOutputAscii(ptr %21, ptr nonnull %_QQcl.544244._QQcl.486569736569, i64 %.3)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %24 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

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

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

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

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

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

attributes #0 = { noreturn }

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