#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 9;
int vl[1001], n, w[1001][1001], idx[1001][1001], dp[1011], pa[1011], pre[1011];
void solve(int l, int r) {
  int i, j, s, p, q, pos, head;
  pos = l - 1;
  head = l;
  while (true) {
    while (l <= r && vl[r] == 0) r--;
    if (l > r) break;
    for (i = pos; i <= r; i++) {
      if (i < r) {
        printf("AR");
      } else {
        printf("A");
      }
    }
    while (head <= r && vl[head] == 0) head++;
    for (i = r; i >= head; i--) {
      if (vl[i] >= 2) break;
    }
    for (j = i - 1; j >= head; j--) {
      if (vl[j] <= 1) break;
    }
    for (pos = r; pos >= max(head, j + 1); pos--) {
      printf("L");
    }
    printf("A");
    for (s = pos + 1; s <= r; s++) {
      if (vl[s] > 0) vl[s]--;
    }
  }
  if (pa[l] != n) {
    for (; pos < pa[l] - 1; pos++) {
      printf("AR");
    }
  }
}
int main() {
  int i, j, s, p, q, now, pf, nw, ip, id;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &vl[i]);
    if (vl[i] >= 2)
      pre[i] = i;
    else {
      if (i == 0)
        pre[i] = i - 1;
      else
        pre[i] = pre[i - 1];
    }
  }
  memset(w, 0, sizeof(w));
  for (i = 0; i < n; i++) {
    w[i][i] = 5 * vl[i];
    idx[i][i] = i;
  }
  for (i = n - 1; i >= 0; i--)
    for (j = i - 1; j >= 0; j--) {
      if (vl[idx[j + 1][i]] <= 1 || vl[j] >= vl[idx[j + 1][i]])
        idx[j][i] = idx[j + 1][i];
      else
        idx[j][i] = j;
    }
  for (j = 1; j < n; j++)
    for (i = 0; i + j < n; i++) {
      s = idx[i][i + j];
      if (vl[i] == 0) {
        w[i][i + j] = 2 + w[i + 1][i + j];
        continue;
      }
      if (vl[i + j] == 0) {
        w[i][i + j] = w[i][i + j - 1];
        continue;
      }
      if (vl[s] <= 1)
        ip = max(pre[s], i - 1);
      else
        ip = s - 1;
      if (i > ip)
        now = 2;
      else
        now = w[i][ip];
      if (vl[s] > 1) {
        if (i > ip)
          now = 2 * vl[s];
        else
          now = w[i][ip];
        if (s + 1 > i + j)
          nw = vl[s] + vl[s];
        else
          nw = w[s + 1][i + j];
        w[i][i + j] = now + vl[s] + nw;
      } else {
        nw = max(1, w[s + 1][i + j] - 1);
        w[i][i + j] = now + 3 * (s - ip) - 1 + nw;
      }
    }
  for (i = 0; i < n; i++) {
    dp[i] = w[i][n - 1];
    pa[i] = n;
  }
  dp[n] = 0;
  for (i = n; i >= 0; i--) {
    for (j = i - 1; j >= 0; j--) {
      if (dp[j] > w[j][i - 1] + 2 * (i - j) + dp[i]) {
        dp[j] = w[j][i - 1] + 2 * (i - j) + dp[i];
        pa[j] = i;
      }
    }
  }
  id = 0;
  while (id != n) {
    solve(id, pa[id] - 1);
    id = pa[id];
  }
  printf("\n");
  return 0;
}
