#include<iostream>
#include<math.h>
#include<algorithm>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<vector>
using namespace std;
#define INF 100000000
#define maxn 100010
struct ticket{
int result;
double weight;
};
bool cmp(ticket a,ticket b)
{
return a.weight>b.weight;
}
vector<ticket> mem[3];
int main(){
map<int,string> m;
m[0]="W";
m[1]="T";
m[2]="L";
for(int j=0;j<3;j++)
for(int i=0;i<3;i++)
{ ticket temp;
double num;
cin>>num;
temp.result=i;
temp.weight=num;
mem[j].push_back(temp);
}
for(int i=0;i<3;i++)
sort(&mem[i][0],&mem[i][0]+3,cmp);
double sum=1;
for(int i=0;i<3;i++)
{
cout<<m[mem[i][0].result]<<" ";
sum=sum*mem[i][0].weight;
}
sum=(sum*0.65-1)*2;
printf("%.2lf",sum);
return 0;
}
#include<math.h>
#include<algorithm>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<vector>
using namespace std;
#define INF 100000000
#define maxn 100010
struct ticket{
int result;
double weight;
};
bool cmp(ticket a,ticket b)
{
return a.weight>b.weight;
}
vector<ticket> mem[3];
int main(){
map<int,string> m;
m[0]="W";
m[1]="T";
m[2]="L";
for(int j=0;j<3;j++)
for(int i=0;i<3;i++)
{ ticket temp;
double num;
cin>>num;
temp.result=i;
temp.weight=num;
mem[j].push_back(temp);
}
for(int i=0;i<3;i++)
sort(&mem[i][0],&mem[i][0]+3,cmp);
double sum=1;
for(int i=0;i<3;i++)
{
cout<<m[mem[i][0].result]<<" ";
sum=sum*mem[i][0].weight;
}
sum=(sum*0.65-1)*2;
printf("%.2lf",sum);
return 0;
}