program prob42
    implicit none
    character(3) :: s
    read(*,*) s
    if(len_trim(s) == 3)then
        write(*,'(a,a,a)') s(3:3), s(2:2), s(1:1) 
    else
        write(*,'(a)') s
    end if

    stop
contains
end program prob42
; 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.5a87e33b2a1fbb0faa329cc1d7cf588f = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5408/source.f\00"
@_QQcl.28612C612C6129 = linkonce constant [7 x i8] c"(a,a,a)"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_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.5a87e33b2a1fbb0faa329cc1d7cf588f, 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
  %.lcssa = phi i1 [ %7, %0 ], [ %11, %8 ], [ %14, %12 ]
  %.not1 = or i1 %.lcssa, %7
  br i1 %.not1, label %22, label %16

16:                                               ; preds = %15
  %17 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28612C612C6129, i64 7, ptr null, i32 -1, ptr nonnull @_QQcl.5a87e33b2a1fbb0faa329cc1d7cf588f, i32 6)
  %18 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 2
  %19 = call i1 @_FortranAioOutputAscii(ptr %17, ptr nonnull %18, i64 1)
  %20 = getelementptr inbounds [3 x [1 x i8]], ptr %1, i64 0, i64 1
  %21 = call i1 @_FortranAioOutputAscii(ptr %17, ptr nonnull %20, i64 1)
  br label %24

22:                                               ; preds = %15
  %23 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.5a87e33b2a1fbb0faa329cc1d7cf588f, i32 8)
  br label %24

24:                                               ; preds = %16, %22
  %.sink6 = phi i64 [ 1, %16 ], [ 3, %22 ]
  %.sink5 = phi ptr [ %17, %16 ], [ %23, %22 ]
  %25 = call i1 @_FortranAioOutputAscii(ptr %.sink5, ptr nonnull %1, i64 %.sink6)
  %26 = call i32 @_FortranAioEndIoStatement(ptr %.sink5)
  %27 = 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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, 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"}
