#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
int main() {
  double w, t, l, a[3];
  for (int i = 0; i < 3; ++i) {
    scanf("%lf%lf%lf", &w, &t, &l);
    if (w > l && w > t) {
      a[i] = w;
      printf("W ");
    } else if (t > w && t > l) {
      a[i] = t;
      printf("T ");
    } else {
      a[i] = l;
      printf("L ");
    }
  }
  int b[3];
  for (int i = 0; i < 3; ++i)
    b[i] = a[i] * 10;
  int ans = (b[0] * b[1] * b[2] * 65 - 100000) * 2;
  int y = ans % 1000;
  if (y >= 500) {
    ans = ans / 1000 + 1;
  } else {
    ans = ans / 1000;
  }
  double ans_d = ans / 100.0;
  printf("%.2lf\n", ans_d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    1211 <main+0xf1>
lea    0xec9(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    119a <main+0x7a>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    119a <main+0x7a>
movsd  -0x10(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x40(%rbp,%rax,8)
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fe <main+0xde>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11dc <main+0xbc>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11dc <main+0xbc>
movsd  -0x18(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x40(%rbp,%rax,8)
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f9 <main+0xd9>
movsd  -0x20(%rbp),%xmm0
movslq -0x44(%rbp),%rax
movsd  %xmm0,-0x40(%rbp,%rax,8)
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fe <main+0xde>
jmp    1203 <main+0xe3>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1136 <main+0x16>
movl   $0x0,-0x54(%rbp)
cmpl   $0x3,-0x54(%rbp)
jge    124e <main+0x12e>
movslq -0x54(%rbp),%rax
movsd  0xdda(%rip),%xmm0
mulsd  -0x40(%rbp,%rax,8),%xmm0
cvttsd2si %xmm0,%ecx
movslq -0x54(%rbp),%rax
mov    %ecx,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1218 <main+0xf8>
mov    -0x50(%rbp),%eax
imul   -0x4c(%rbp),%eax
imul   -0x48(%rbp),%eax
imul   $0x41,%eax,%eax
sub    $0x186a0,%eax
shl    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x5c(%rbp)
cmpl   $0x1f4,-0x5c(%rbp)
jl     1298 <main+0x178>
mov    -0x58(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    12a6 <main+0x186>
mov    -0x58(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x58(%rbp)
cvtsi2sdl -0x58(%rbp),%xmm0
movsd  0xd4d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
lea    0xd5b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xee4(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm2
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
lea    0xec0(%rip),%rbx
jbe    116d <main+0x4d>
ucomisd %xmm0,%xmm2
jbe    116d <main+0x4d>
movsd  %xmm2,0x28(%rsp)
mov    %rbx,%rdi
jmp    119b <main+0x7b>
ucomisd %xmm2,%xmm0
seta   %al
ucomisd %xmm1,%xmm0
seta   %cl
lea    0xe9b(%rip),%rdx
lea    0xe97(%rip),%rdi
test   %cl,%al
cmovne %rdx,%rdi
jne    1195 <main+0x75>
movapd %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm2
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
jbe    11e3 <main+0xc3>
ucomisd %xmm0,%xmm2
jbe    11e3 <main+0xc3>
movsd  %xmm2,0x20(%rsp)
mov    %rbx,%rdi
jmp    1211 <main+0xf1>
ucomisd %xmm2,%xmm0
seta   %al
ucomisd %xmm1,%xmm0
seta   %cl
lea    0xe25(%rip),%rdx
lea    0xe21(%rip),%rdi
test   %cl,%al
cmovne %rdx,%rdi
jne    120b <main+0xeb>
movapd %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xdf1(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm2
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
jbe    1256 <main+0x136>
ucomisd %xmm0,%xmm2
jbe    1256 <main+0x136>
movsd  %xmm2,0x18(%rsp)
jmp    1284 <main+0x164>
ucomisd %xmm2,%xmm0
seta   %al
ucomisd %xmm1,%xmm0
seta   %cl
lea    0xdb2(%rip),%rdx
lea    0xdae(%rip),%rbx
test   %cl,%al
cmovne %rdx,%rbx
jne    127e <main+0x15e>
movapd %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0xd6a(%rip),%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
movsd  0x20(%rsp),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ecx
imul   %eax,%ecx
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
imul   %ecx,%eax
mov    %eax,%ecx
shl    $0x7,%ecx
lea    (%rcx,%rax,2),%eax
add    $0xfffcf2c0,%eax
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%edx
sub    %edx,%eax
xor    %edx,%edx
cmp    $0x1f4,%eax
setge  %dl
add    %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
divsd  0xcfc(%rip),%xmm0
lea    0xd10(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [3 x i8] c"W \00"
@.str.2 = [3 x i8] c"T \00"
@.str.3 = [3 x i8] c"L \00"
@.str.4 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca [3 x double]
%6 = alloca i32
%7 = alloca [3 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
store i32 0, i32* %1
store i32 0, i32* %6
br label %12
12: ; preds = %52, %0
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %55
15: ; preds = %12
%16 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%17 = load double, double* %2
%18 = load double, double* %4
%19 = fcmp ogt double %17, %18
br i1 %19, label %20, label %30
20: ; preds = %15
%21 = load double, double* %2
%22 = load double, double* %3
%23 = fcmp ogt double %21, %22
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load double, double* %2
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 %27
store double %25, double* %28
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %51
30: ; preds = %20, %15
%31 = load double, double* %3
%32 = load double, double* %2
%33 = fcmp ogt double %31, %32
br i1 %33, label %34, label %44
34: ; preds = %30
%35 = load double, double* %3
%36 = load double, double* %4
%37 = fcmp ogt double %35, %36
br i1 %37, label %38, label %44
38: ; preds = %34
%39 = load double, double* %3
%40 = load i32, i32* %6
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 %41
store double %39, double* %42
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %50
44: ; preds = %34, %30
%45 = load double, double* %4
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 %47
store double %45, double* %48
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %50
50: ; preds = %44, %38
br label %51
51: ; preds = %50, %24
br label %52
52: ; preds = %51
%53 = load i32, i32* %6
%54 = add nsw i32 %53, 1
store i32 %54, i32* %6
br label %12
55: ; preds = %12
store i32 0, i32* %8
br label %56
56: ; preds = %69, %55
%57 = load i32, i32* %8
%58 = icmp slt i32 %57, 3
br i1 %58, label %59, label %72
59: ; preds = %56
%60 = load i32, i32* %8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 %61
%63 = load double, double* %62
%64 = fmul double %63, 1.000000e+01
%65 = fptosi double %64 to i32
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 %67
store i32 %65, i32* %68
br label %69
69: ; preds = %59
%70 = load i32, i32* %8
%71 = add nsw i32 %70, 1
store i32 %71, i32* %8
br label %56
72: ; preds = %56
%73 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%74 = load i32, i32* %73
%75 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 1
%76 = load i32, i32* %75
%77 = mul nsw i32 %74, %76
%78 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 2
%79 = load i32, i32* %78
%80 = mul nsw i32 %77, %79
%81 = mul nsw i32 %80, 65
%82 = sub nsw i32 %81, 100000
%83 = mul nsw i32 %82, 2
store i32 %83, i32* %9
%84 = load i32, i32* %9
%85 = srem i32 %84, 1000
store i32 %85, i32* %10
%86 = load i32, i32* %10
%87 = icmp sge i32 %86, 500
br i1 %87, label %88, label %92
88: ; preds = %72
%89 = load i32, i32* %9
%90 = sdiv i32 %89, 1000
%91 = add nsw i32 %90, 1
store i32 %91, i32* %9
br label %95
92: ; preds = %72
%93 = load i32, i32* %9
%94 = sdiv i32 %93, 1000
store i32 %94, i32* %9
br label %95
95: ; preds = %92, %88
%96 = load i32, i32* %9
%97 = sitofp i32 %96 to double
%98 = fdiv double %97, 1.000000e+02
store double %98, double* %11
%99 = load double, double* %11
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %99)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [3 x i8] c"W \00"
@.str.2 = [3 x i8] c"T \00"
@.str.3 = [3 x i8] c"L \00"
@.str.4 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %1
%9 = load double, double* %3
%10 = fcmp ogt double %8, %9
%11 = load double, double* %2
%12 = fcmp ogt double %8, %11
%13 = select i1 %10, i1 %12, i1 false
br i1 %13, label %20, label %14
14: ; preds = %0
%15 = fcmp ogt double %11, %8
%16 = fcmp ogt double %11, %9
%17 = select i1 %15, i1 %16, i1 false
%18 = select i1 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%19 = select i1 %17, double %11, double %9
br label %20
20: ; preds = %14, %0
%21 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %0 ], [ %18, %14 ]
%22 = phi double [ %8, %0 ], [ %19, %14 ]
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %21)
%24 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%25 = load double, double* %1
%26 = load double, double* %3
%27 = fcmp ogt double %25, %26
%28 = load double, double* %2
%29 = fcmp ogt double %25, %28
%30 = select i1 %27, i1 %29, i1 false
br i1 %30, label %37, label %31
31: ; preds = %20
%32 = fcmp ogt double %28, %25
%33 = fcmp ogt double %28, %26
%34 = select i1 %32, i1 %33, i1 false
%35 = select i1 %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%36 = select i1 %34, double %28, double %26
br label %37
37: ; preds = %20, %31
%38 = phi i8* [ %35, %31 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %20 ]
%39 = phi double [ %36, %31 ], [ %25, %20 ]
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %38)
%41 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%42 = load double, double* %1
%43 = load double, double* %3
%44 = fcmp ogt double %42, %43
%45 = load double, double* %2
%46 = fcmp ogt double %42, %45
%47 = select i1 %44, i1 %46, i1 false
br i1 %47, label %54, label %48
48: ; preds = %37
%49 = fcmp ogt double %45, %42
%50 = fcmp ogt double %45, %43
%51 = select i1 %49, i1 %50, i1 false
%52 = select i1 %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%53 = select i1 %51, double %45, double %43
br label %54
54: ; preds = %37, %48
%55 = phi i8* [ %52, %48 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %37 ]
%56 = phi double [ %53, %48 ], [ %42, %37 ]
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %55)
%58 = fmul double %22, 1.000000e+01
%59 = fptosi double %58 to i32
%60 = fmul double %39, 1.000000e+01
%61 = fptosi double %60 to i32
%62 = fmul double %56, 1.000000e+01
%63 = fptosi double %62 to i32
%64 = mul i32 %59, 130
%65 = mul i32 %64, %61
%66 = mul i32 %65, %63
%67 = add i32 %66, -200000
%68 = srem i32 %67, 1000
%69 = icmp sgt i32 %68, 499
%70 = sdiv i32 %67, 1000
%71 = zext i1 %69 to i32
%72 = add nsw i32 %70, %71
%73 = sitofp i32 %72 to double
%74 = fdiv double %73, 1.000000e+02
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), double %74)
ret i32 0
}