89_E. Fire and Ice
The Fire Lord attacked the Frost Kingdom. He has already got to the Ice Fortress, where the Snow Queen dwells. He arranged his army on a segment n in length not far from the city walls. And only the frost magician Solomon can save the Frost Kingdom.

<image>

The n-long segment is located at a distance equal exactly to 1 from the castle walls. It can be imaginarily divided into unit segments. On some of the unit segments fire demons are located — no more than one demon per position. Each demon is characterised by his strength - by some positive integer. We can regard the fire demons being idle.

Initially Solomon is positioned on the fortress wall. He can perform the following actions several times in a row: 

  * "L" — Solomon shifts one unit to the left. This movement cannot be performed on the castle wall.
  * "R" — Solomon shifts one unit to the left. This movement cannot be performed if there's no ice block to the right.
  * "A" — If there's nothing to the right of Solomon, then Solomon creates an ice block that immediately freezes to the block that Solomon is currently standing on. If there already is an ice block, then Solomon destroys it. At that the ice blocks to the right of the destroyed one can remain but they are left unsupported. Those ice blocks fall down.



Solomon spends exactly a second on each of these actions.

As the result of Solomon's actions, ice blocks' segments fall down. When an ice block falls on a fire demon, the block evaporates and the demon's strength is reduced by 1. When the demons' strength is equal to 0, the fire demon vanishes. The picture below shows how it happens. The ice block that falls on the position with no demon, breaks into lots of tiny pieces and vanishes without hurting anybody.

<image>

Help Solomon destroy all the Fire Lord's army in minimum time.

Input

The first line contains an integer n (1 ≤ n ≤ 1000). The next line contains n numbers, the i-th of them represents the strength of the fire demon standing of the i-th position, an integer from 1 to 100. If there's no demon on the i-th position, then the i-th number equals to 0. It is guaranteed that the input data have at least one fire demon.

Output

Print a string of minimum length, containing characters "L", "R" and "A" — the succession of actions leading to the required result.

If there are several possible answers, print any of them.

Examples

Input

3
1 0 1


Output

ARARARALLLA

Input

3
0 2 0


Output

ARARALAARALA
```python
n = int(input())
a = [0] * 1010
b = [0] * 2010
S = 1000000007
W=0
b = list(map(int,input().strip().split()))[:n]
for i in range(0,n):
    a.insert(i,b[i])
while(not a[n-1]):
    n-=1
for w in range(0,n+1):
    for i in range(0,n):
        b[i]=a[i]
    for i in range(w,n):
        if(b[i]):
            b[i]-=1
    w0=0
    w1=0
    la=0
    for i in range(0,n):
        w0+=max(0,b[i]-la)
        w1 += b[i]
        la = b[i]
    T = 2*n+2+(n-w)+3*w1+2*w0
    for i in range(0,n):
        if(T<S):
            S=T
            W=w
for i in range(W,n):
    if(a[i]):
        a[i]-=1
for i in range(0,n):
    while(a[i]):
        j=i
        while(a[j]):
            a[j]-=1
            j+=1
        l = j - i
        for k in range(0,l):
            print("AR",end="")
        print("A",end="")
        for k in range(0,l):
            print("L",end="")
        print("A",end="")
    print("AR",end="")
print("A",end="")
for i in range(W,n):
    print("L",end="")
print("A",end="")

```