#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
const double error = 1e-7;
const double PI = acos(-1);
mt19937 rng(
    (unsigned int)chrono::system_clock::now().time_since_epoch().count());
inline long long int MOD(long long int x, long long int m = mod) {
  long long int y = x % m;
  return (y >= 0) ? y : y + m;
}
const int inf = 1e9 + 2;
const long long int infl = 1e18 + 1;
const int nmax = 5e5 + 10;
int n;
int input[nmax];
int getans(int reach) {
  int ret = reach * 2 + 2 + 3 * (n - reach);
  int cur = 0;
  for (int i = 0; i <= n; i++) {
    int tmp = (i > reach && input[i] > 0) ? input[i] - 1 : input[i];
    if (cur < tmp) ret += 2 * (tmp - cur);
    cur = tmp;
    ret += 3 * cur;
  }
  return ret;
}
void cut(int x, int l, int k) {
  while (k--) {
    cout << 'A';
    for (int i = x + 1; i <= x + l; i++) {
      cout << "RA";
      input[i]--;
    }
    for (int i = x + l; i > x; i--) cout << 'L';
    cout << 'A';
  }
  return;
}
void solve(int reach) {
  auto arr = [&](int i) {
    return (i > reach && input[i] > 0) ? input[i] - 1 : input[i];
  };
  for (int i = 0; i < n; i++) {
    int j;
    int most = arr(i + 1);
    for (j = i + 1; j <= n; j++) {
      int tmp = arr(j);
      if (tmp == 0) break;
      if (tmp < most) {
        cut(i, j - i - 1, most - tmp);
        most = tmp;
      }
    }
    cut(i, j - i - 1, most);
    cout << "AR";
  }
  cout << 'A';
  for (int i = 0; i < n - reach; i++) cout << 'L';
  cout << 'A';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> input[i];
  for (int i = n; i > 0; i--)
    if (input[i] > 0) {
      n = i;
      break;
    }
  int reachfrom = 0;
  int bestans = inf;
  for (int i = 0; i < n; i++) {
    int tmp = getans(i);
    if (tmp < bestans) {
      bestans = tmp;
      reachfrom = i;
    }
  }
  solve(reachfrom);
}
