#include <bits/stdc++.h>
using namespace std;
int n, a[1005], pos, ice, l, r, top;
char ans[1000005];
void solve(int l, int r) {
  if (l > r) return;
  int mn = a[l];
  for (int i = (int)(l); i <= (int)(r); i++) mn = min(mn, a[i]);
  for (int i = (int)(l); i <= (int)(r); i++) a[i] -= mn;
  int la = l;
  for (int i = (int)(l); i <= (int)(r + 1); i++)
    if (!a[i] || i == r + 1) solve(la, i - 1), la = i + 1;
  for (int i = (int)(1); i <= (int)(mn); i++) {
    for (; ice < r;) {
      if (pos == ice)
        ans[++top] = 'A', ++ice;
      else
        ans[++top] = 'R', ++pos;
    }
    for (; pos + 1 >= l; --pos) ans[++top] = 'L';
    ans[++top] = 'A';
    ice = pos;
  }
}
void work(int l, int r) {
  if (l > r) return;
  int L = l - 1;
  for (; a[L]; --L)
    ;
  if (2 * (l - L) >= r - l + 1)
    for (int i = (int)(l); i <= (int)(r); i++) a[i] = 1;
}
int main() {
  scanf("%d", &n);
  for (int i = (int)(1); i <= (int)(n); i++) scanf("%d", &a[i]);
  for (l = 1; !a[l]; ++l)
    ;
  for (r = n; !a[r]; --r)
    ;
  int la = l;
  for (int i = (int)(l); i <= (int)(r + 1); i++)
    if (a[i] || i == r + 1) work(la, i - 1), la = i + 1;
  pos = -1;
  ice = -1;
  solve(l, r);
  printf("%s", ans + 1);
}
