Preventing Paradoxes

No attempts yetTime limit1sMemory limit128 MB

Problem

Time traveling runs the risk of causing all sorts of problems and paradoxes—duplicate people, parallel universes, and black holes, to name a few. Tim is well aware of what's at stake, but he keeps time traveling because he knows the secret: you have to properly close the tears in the space-time continuum! You do this simply by visiting each space-time destination in a right-handed (that is, clockwise) orientation.

Tim has a list of points in the space-time plane that describe his trip, and he must start and end at the same point. There are two ways to traverse the list: forwards and backwards. One way leads to prosperity, the other to paradoxes and total ruin. Write a program that, following the points in the given input order, decides whether Tim's right hand would be touching the interior of the polygon.

Input

The first line contains the number $K$ of data sets. It is followed by $K$ data sets, each of the following form.

The first line of each data set contains the number $N$ ($3 \le N \le 100$) of space-time points in Tim's trip. Each of the next $N$ lines contains two integers $s$ and $t$, a space-time coordinate, where $s$ is plotted on the x-axis and $t$ on the y-axis, with $-100 \le s, t \le 100$. Taken in order, the $N$ points always form a closed, non-self-intersecting polygon, and no three consecutive points are collinear.

Output

For each data set, first print Data Set x: on a line by itself, where $x$ is its number. On the next line, print RIGHT if, looking down on the space-time plane, Tim's right hand would touch the interior of the polygon as he traverses the points in input order; otherwise print LEFT. Separate consecutive data sets with a blank line.