L. Look left? Look right?
time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Travelling on foot in a metropolis is harder than you imagine, especially when you are required to cross a road with absolutely busy traffic.

Imagine you are trying to cross a road with $$$N + 2$$$ lanes, with no traffic islands in between. The lanes are numbered from $$$0$$$ to $$$N + 1$$$, from nearest to farthest. For each lane $$$i$$$ ($$$1 \leq i \leq N$$$), there will be exactly one car approaching on each lane from the left, expecting to arrive at time $$$T_i$$$. There are no cars on lane $$$0$$$ and lane $$$N + 1$$$.

You would like to cross the road by only moving forward. You start at lane $$$0$$$ at time $$$0$$$. For each lane $$$i$$$ ($$$1 \leq i \leq N$$$), you will wait at lane $$$i - 1$$$ before stepping onto lane $$$i$$$.

Suppose you just stepped on lane $$$i - 1$$$ at time $$$t$$$. You can immediately choose to either look left or look right. The time you move forward will then be determined as follows:

  • If you decided to look left, and noticed the car at lane $$$i$$$ will be arriving between time $$$t + 1$$$ and $$$t + 4$$$ (inclusive), where $$$t$$$ is the current time, then you will wait till the car passes by and step onto lane $$$i$$$ at time $$$T_i + 1$$$.
  • Otherwise, you will step onto lane $$$i$$$ at time $$$t + 1$$$, regardless of when the car passes by.

After you step onto lane $$$N$$$ at time $$$t$$$, you will step onto lane $$$N + 1$$$ at time $$$t + 1$$$.

You are considered hit by a car if you are still staying at lane $$$i$$$ at time $$$T_i$$$, which means you have stepped onto lane $$$i$$$ no later than time $$$T_i$$$ but decided to step onto lane $$$i + 1$$$ after time $$$T_i$$$.

For each lane, can you decide whether to look left or look right so that you can step onto lane $$$N + 1$$$ safely?

Input

The first line of input consists of a single integer $$$N$$$ ($$$1 \leq N \leq 10^5$$$), the number of lanes with cars.

The second line of input consists of $$$N$$$ integers $$$T_i$$$ ($$$1 \leq T_i \leq 10^9$$$), the timings when the cars are approaching.

Output

If it is not possible to reach lane $$$N + 1$$$, output Impossible.

Otherwise, output a string of $$$N$$$ characters, consisting of L and R only. The $$$i$$$-th character ($$$1 \leq i \leq N$$$) should be L if you decided to look left at lane $$$i - 1$$$, and R if you decided to look right at lane $$$i - 1$$$.

If there are multiple ways to reach lane $$$N + 1$$$, you may output any of them.

Examples
Input
3
1 5 5
Output
LRR
Input
10
8 8 8 8 8 8 8 8 8 8
Output
Impossible
Note

For the first sample test, the output LRR corresponds to the following crossing strategy:

  • You start at lane 0 at time 0.
  • At lane 0, you look left and noticed a car arriving soon (between time 1 and 4). You wait till the car passes by and step onto lane 1 at time 2.
  • At lane 1, you look right and did not see any cars (of course!). You move forward to lane 2 at time 3.
  • At lane 2, you look right again and did not see any cars. You move forward to lane 3 at time 4.
  • At lane 3, you would immediately move forward. You step onto lane 4 at time 5.

The output LLL is also acceptable, corresponding to the following crossing strategy:

  • You start at lane 0 at time 0.
  • At lane 0, you look left and noticed a car arriving soon (between time 1 and 4). You wait till the car passes by and step onto lane 1 at time 2.
  • At lane 1, you look left again and noticed a car arriving soon (between time 3 and 6). You wait till the car passes by and step onto lane 2 at time 6.
  • At lane 2, you look left again but this time you did not see any cars. You move forward to lane 3 at time 7.
  • At lane 3, you would immediately move forward. You step onto lane 4 at time 8.

However, the output LRL is unacceptable for the following reason:

  • You start at lane 0 at time 0.
  • At lane 0, you look left and noticed a car arriving soon (between time 1 and 4). You wait till the car passes by and step onto lane 1 at time 2.
  • At lane 1, you look right and did not see any cars (of course!). You move forward to lane 2 at time 3.
  • At lane 2, you look left and noticed a car arriving soon (between time 4 and 7). You would wait till the car passes by and step onto lane 3 at time 6.
  • However, while waiting, you would get hit by the car on lane 2, which arrives at time 5.