program main
	implicit none
    character::a,b
    read(*,*) a,b
    if(a=='H' .and. b=='H')then
    	write(*,*)'H'
    else if(a=='H' .and. b=='D')then
    	write(*,*)'D'
    else if(a=='D' .and. b=='H')then
    	write(*,*)'D'
    else
    	write(*,*)'H'
    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.a2b43e2aed61fd3e383587cfd0077ad6 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7447/source.f\00"
@_QQcl.48 = linkonce constant [1 x i8] c"H"
@_QQcl.44 = linkonce constant [1 x i8] c"D"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca [1 x i8], align 1
  %2 = alloca [1 x i8], align 1
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a2b43e2aed61fd3e383587cfd0077ad6, i32 4)
  %4 = call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull %1, i64 1)
  %5 = call i1 @_FortranAioInputAscii(ptr %3, ptr nonnull %2, i64 1)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %7 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.48, i64 1, i64 1)
  %8 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull @_QQcl.48, i64 1, i64 1)
  %9 = or i32 %8, %7
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %21, label %11

11:                                               ; preds = %0
  %12 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.48, i64 1, i64 1)
  %13 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull @_QQcl.44, i64 1, i64 1)
  %14 = or i32 %13, %12
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %21, label %16

16:                                               ; preds = %11
  %17 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.44, i64 1, i64 1)
  %18 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %2, ptr nonnull @_QQcl.48, i64 1, i64 1)
  %19 = or i32 %18, %17
  %20 = icmp eq i32 %19, 0
  %. = select i1 %20, i32 10, i32 12
  %_QQcl.44._QQcl.48 = select i1 %20, ptr @_QQcl.44, ptr @_QQcl.48
  br label %21

21:                                               ; preds = %16, %11, %0
  %.sink = phi i32 [ 6, %0 ], [ 8, %11 ], [ %., %16 ]
  %_QQcl.48.sink = phi ptr [ @_QQcl.48, %0 ], [ @_QQcl.44, %11 ], [ %_QQcl.44._QQcl.48, %16 ]
  %22 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.a2b43e2aed61fd3e383587cfd0077ad6, i32 %.sink)
  %23 = call i1 @_FortranAioOutputAscii(ptr %22, ptr nonnull %_QQcl.48.sink, i64 1)
  %24 = call i32 @_FortranAioEndIoStatement(ptr %22)
  %25 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) 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}
