A - Balance Scale Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 200 点

問題文

高橋君は天秤を使って N 回の実験をしました。 i 回目の実験では、天秤の左の皿に重さ A_i グラムのおもりを、右の皿に重さ B_i グラムのおもりを乗せました。

各実験について、左の皿が下がるなら Left を、右の皿が下がるなら Right を、釣り合うなら Balanced を出力してください。重い方の皿が下がります。

制約

  • 1 \leq N \leq 100
  • 1 \leq A_i \leq 1000
  • 1 \leq B_i \leq 1000
  • 入力はすべて整数

入力

入力は以下の形式で標準入力から与えられる。

N
A_1 B_1
A_2 B_2
\vdots
A_N B_N
  • 1 行目には、実験の回数 N が与えられる。
  • 2 行目から N 行にわたり、 1 + i 行目には i 回目の実験で乗せたおもりの重さ A_i と B_i がスペース区切りで与えられる。

出力

N 行出力せよ。 i 行目には i 回目の実験の結果( Left , Right , Balanced のいずれか)を出力せよ。


入力例 1

3
5 3
2 9
10 4

出力例 1

Left
Right
Left

入力例 2

1
7 8

出力例 2

Right

入力例 3

2
100 1
1 100

出力例 3

Left
Right

入力例 4

4
1000 998
999 1000
1 2
2 1

出力例 4

Left
Right
Right
Left

入力例 5

1
1000 5

出力例 5

Left

Score : 200 pts

Problem Statement

Takahashi conducted N experiments using a balance scale. In the i-th experiment, he placed a weight of A_i grams on the left pan and a weight of B_i grams on the right pan.

For each experiment, print Left if the left pan goes down, Right if the right pan goes down, and Balanced if the scale balances. The heavier pan goes down.

Constraints

  • 1 \leq N \leq 100
  • 1 \leq A_i \leq 1000
  • 1 \leq B_i \leq 1000
  • All input values are integers.

Input

The input is given from standard input in the following format:

N
A_1 B_1
A_2 B_2
\vdots
A_N B_N
  • The first line contains the number of experiments N.
  • For each of the next N lines, line 1 + i contains the weights A_i and B_i placed in the i-th experiment, separated by a space.

Output

Print N lines. The i-th line should contain the result of the i-th experiment (one of Left, Right, or Balanced).


Sample Input 1

3
5 3
2 9
10 4

Sample Output 1

Left
Right
Left

Sample Input 2

1
7 8

Sample Output 2

Right

Sample Input 3

2
100 1
1 100

Sample Output 3

Left
Right

Sample Input 4

4
1000 998
999 1000
1 2
2 1

Sample Output 4

Left
Right
Right
Left

Sample Input 5

1
1000 5

Sample Output 5

Left