A - Yen Appreciation and Yen Depreciation Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 200 点

問題文

高橋君は N 日間、為替レートを記録しました。 i 日目については、前日のレート A_i と当日のレート B_i が記録されています。レートは 1 ドルが何円かを表す整数です。

各日について、レートが前日より下がった(円高になった)なら H 、上がった(円安になった)なら L 、変わらなかったなら E として、 1 日目から順に並べた長さ N の文字列を出力してください。

制約

  • 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 の文字列を 1 行で出力せよ。


入力例 1

3
150 148
148 152
152 160

出力例 1

HLL

入力例 2

1
110 109

出力例 2

H

入力例 3

2
100 130
130 120

出力例 3

LH

入力例 4

4
1 2
2 100
1000 999
999 1000

出力例 4

LLHL

入力例 5

3
150 148
148 76
152 160

出力例 5

HHL

Score : 200 pts

Problem Statement

Takahashi recorded exchange rates for N days. For day i, the previous day's rate A_i and that day's rate B_i are recorded. The rate is an integer representing how many yen one dollar is worth.

For each day, output H if the rate went down compared to the previous day (the yen appreciated), L if it went up (the yen depreciated), and E if it did not change. Print these as a single string of length N, ordered from day 1.

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 days N.
  • For each of the N lines starting from the second line, the (1+i)-th line contains the previous day's rate A_i and the current day's rate B_i for day i, separated by a space.

Output

Print a string of length N on a single line.


Sample Input 1

3
150 148
148 152
152 160

Sample Output 1

HLL

Sample Input 2

1
110 109

Sample Output 2

H

Sample Input 3

2
100 130
130 120

Sample Output 3

LH

Sample Input 4

4
1 2
2 100
1000 999
999 1000

Sample Output 4

LLHL

Sample Input 5

3
150 148
148 76
152 160

Sample Output 5

HHL