      PROGRAM piyo
      IMPLICIT NONE
      character(3) :: s
      integer :: ans
      
      read*,s
      
      
      if( s == 'MON' ) ans = 6
      if( s == 'TUE' ) ans = 5
      if( s == 'WED' ) ans = 4
      if( s == 'THU' ) ans = 3
      if( s == 'FRI' ) ans = 2
      if( s == 'SAT' ) ans = 1
      if( s == 'SUN' ) ans = 7
      
      
      print*,ans
      
      
      
      
      
      END PROGRAM
; 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.df66978b0ab68586dbdff2b882093792 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2914/source.f\00"
@_QQcl.4D4F4E = linkonce constant [3 x i8] c"MON"
@_QQcl.545545 = linkonce constant [3 x i8] c"TUE"
@_QQcl.574544 = linkonce constant [3 x i8] c"WED"
@_QQcl.544855 = linkonce constant [3 x i8] c"THU"
@_QQcl.465249 = linkonce constant [3 x i8] c"FRI"
@_QQcl.534154 = linkonce constant [3 x i8] c"SAT"
@_QQcl.53554E = linkonce constant [3 x i8] c"SUN"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca [3 x i8], align 1
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.df66978b0ab68586dbdff2b882093792, i32 6)
  %3 = call i1 @_FortranAioInputAscii(ptr %2, ptr nonnull %1, i64 3)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.4D4F4E, i64 3, i64 3)
  %6 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.545545, i64 3, i64 3)
  %7 = icmp eq i32 %6, 0
  %.1 = select i1 %7, i32 5, i32 6
  %8 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.574544, i64 3, i64 3)
  %9 = icmp eq i32 %8, 0
  %.2 = select i1 %9, i32 4, i32 %.1
  %10 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.544855, i64 3, i64 3)
  %11 = icmp eq i32 %10, 0
  %.3 = select i1 %11, i32 3, i32 %.2
  %12 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.465249, i64 3, i64 3)
  %13 = icmp eq i32 %12, 0
  %.4 = select i1 %13, i32 2, i32 %.3
  %14 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.534154, i64 3, i64 3)
  %15 = icmp eq i32 %14, 0
  %.5 = select i1 %15, i32 1, i32 %.4
  %16 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull @_QQcl.53554E, i64 3, i64 3)
  %17 = icmp eq i32 %16, 0
  %.6 = select i1 %17, i32 7, i32 %.5
  %18 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.df66978b0ab68586dbdff2b882093792, i32 18)
  %19 = call i1 @_FortranAioOutputInteger32(ptr %18, i32 %.6)
  %20 = call i32 @_FortranAioEndIoStatement(ptr %18)
  ret void
}

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 @_FortranAioOutputInteger32(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}
