Balancing Weights

No attempts yetTime limit1sMemory limit256 MB

Problem

A lever 20 meters long rests on a massless support at its exact middle and is balanced. Several weights are placed on the lever, and you have to decide which side goes down, if any.

The torque produced by a single weight is

τ=m×d\tau = m \times d

where mm is the mass of the weight and dd is its distance from the center. The angular acceleration of the lever follows α=τ/I\alpha = \tau / I, and the moment of inertia is I=r2dmI = \int r^2\,dm, where rr is the perpendicular distance to the axis of rotation.

The lever itself weighs 2000 grams, spread evenly along its length. Each weight weighs 100 grams and is treated as a point mass with no size.

Input

The first line contains TT, the number of test cases. Each test case begins with a line containing NN, the number of weights. The next line contains the positions W1,W2,,WNW_1, W_2, \dots, W_N of those weights, separated by spaces. A position is measured from the center of the lever in centimeters. A negative WiW_i puts the weight to the left of the center, a positive one puts it to the right.

  • 0<T1000 < T \le 100
  • 0<N1000 < N \le 100
  • 1000Wi1000-1000 \le W_i \le 1000

Output

For each test case, print one line. Print Left if the lever tips to the left, Right if it tips to the right, and Equilibrium if it does not tip to either side.