program main
	implicit none
    character(3)::s
    read(*,*)s
    if(len_trim(s)==2)then
    	write(*,*)s
    else
    	write(*,*)s(3:3)//s(2:2)//s(1:1)
    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.0bdbdfb5cc8452c951fa92556445d233 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5403/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca [3 x i8], align 1
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0bdbdfb5cc8452c951fa92556445d233, i32 4)
  %3 = call i1 @_FortranAioInputAscii(ptr %2, ptr nonnull %1, i64 3)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 2
  %6 = load i8, ptr %5, align 1, !tbaa !3
  %7 = icmp eq i8 %6, 32
  br i1 %7, label %8, label %15

8:                                                ; preds = %0
  %9 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 1
  %10 = load i8, ptr %9, align 1, !tbaa !3
  %11 = icmp eq i8 %10, 32
  br i1 %11, label %12, label %15

12:                                               ; preds = %8
  %13 = load i8, ptr %1, align 1, !tbaa !3
  %14 = icmp eq i8 %13, 32
  br label %15

15:                                               ; preds = %12, %8, %0
  %16 = phi i1 [ true, %12 ], [ false, %8 ], [ true, %0 ]
  %.lcssa = phi i1 [ %14, %12 ], [ %11, %8 ], [ %7, %0 ]
  %.not6 = or i1 %.lcssa, %16
  br i1 %.not6, label %19, label %17

17:                                               ; preds = %15
  %18 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0bdbdfb5cc8452c951fa92556445d233, i32 6)
  br label %29

19:                                               ; preds = %15
  %20 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0bdbdfb5cc8452c951fa92556445d233, i32 8)
  %21 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 2
  %22 = alloca [2 x i8], align 2
  %23 = load i8, ptr %21, align 1
  store i8 %23, ptr %22, align 2
  %24 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 1
  %.fca.0.load = load i8, ptr %24, align 1, !tbaa !3
  %25 = getelementptr inbounds [1 x i8], ptr %22, i64 1
  store i8 %.fca.0.load, ptr %25, align 1, !tbaa !3
  %26 = alloca [3 x i8], align 2
  %27 = load i16, ptr %22, align 2
  store i16 %27, ptr %26, align 2
  %.fca.0.load2 = load i8, ptr %1, align 1, !tbaa !3
  %28 = getelementptr inbounds [1 x i8], ptr %26, i64 2
  store i8 %.fca.0.load2, ptr %28, align 2, !tbaa !3
  br label %29

29:                                               ; preds = %17, %19
  %.sink11 = phi ptr [ %1, %17 ], [ %26, %19 ]
  %.sink10 = phi ptr [ %18, %17 ], [ %20, %19 ]
  %30 = call i1 @_FortranAioOutputAscii(ptr %.sink10, ptr nonnull %.sink11, i64 3)
  %31 = call i32 @_FortranAioEndIoStatement(ptr %.sink10)
  %32 = 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 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"}
