#include<bits/stdc++.h>usingnamespace std;#definefifirst#definesesecond#defineIOSstd::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);#defineintlonglongconstint N =2e6+10;constint mod =1e9+7;typedef pair<int,int>PII;//--------------------------------------------------------------constdouble eps =1e-5;constdouble pi =acos(-1);inlinedoublesqr(double x){return x * x;}//平方intsign(double x){if(fabs(x)< eps)return0;if(x >0)return1;return-1;}//符号structpoint{double x , y;point(){}point(double a ,double b):x(a),y(b){}friend point operator+(const point &a ,const point &b){returnpoint(a.x + b.x , a.y + b.y);}friend point operator-(const point &a ,const point &b){returnpoint(a.x - b.x , a.y - b.y);}friendbooloperator==(const point &a ,const point &b){return!sign(a.x - b.x)&&!sign(a.y - b.y);}friend point operator*(const point &a ,constdouble&b){returnpoint(a.x * b , a.y * b);}friend point operator*(constdouble&a ,const point &b){returnpoint(a * b.x , a * b.y);}friend point operator/(const point &a ,constdouble&b){returnpoint(a.x / b , a.y / b);}//向量模长 doublenorm(){returnsqrt(sqr(x)+sqr(y));}};doubledet(const point &a ,const point &b){return a.x * b.y - a.y * b.x;}//叉积 判断两点共线 doubledot(const point &a ,const point &b){return a.x * b.x + a.y * b.y;}//点积doubledist(const point &a ,const point &b){return(a - b).norm();}//两点距离
point rotate_point(const point &a ,const point &p ,double A){double tx = p.x - a.x , ty = p.y - a.y;returnpoint(a.x + tx *cos(A)- ty *sin(A), a.y + tx *sin(A)+ ty *cos(A));}// p 点 绕 a 点逆时针旋转 A 弧度//大于 0 点在线左边//等于 0 点在线上边//小于 0 点在线右边doubletoleft(point p , point a, point b){
point A =point(b.x - a.x , b.y - a.y);//向量ab
point B =point(p.x - a.x , p.y - a.y);//向量apreturndet(A , B);}//--------------------------------------------------------------int t , n;
point p[50];double x , y;inlineintnex(int x){return(x +1)% n ;}inlineintpre(int x){return(x -1+ n)% n ;}signedmain(){
IOS
cin >> t;while(t --){
n =20;for(int i =0; i < n ; i ++){
cin >> x >> y;
p[i]={x , y};}int id =0;for(int i =0; i < n ; i ++)if(sign(dist(p[i], p[nex(i)])-9.0)==0) id =nex(i);if(sign(toleft(p[nex(id)], p[pre(id)], p[id]))==1&&sign(dist(p[id], p[nex(id)])-8.0)==0||sign(toleft(p[nex(id)], p[pre(id)], p[id]))==-1&&sign(dist(p[id], p[nex(id)])-6.0)==0){
cout <<"right\n";}else{
cout <<"left\n";}}return0;}//freopen("文件名.in","r",stdin);//freopen("文件名.out","w",stdout);