#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 30);
const double eps = 1e-9;
const int MAXN = int(1e3) + 100;
const int dx[] = {-1, +1, 0, 0};
const int dy[] = {0, 0, -1, +1};
int Min(int a, int b, int c) { return min(a, min(b, c)); }
int main() {
  ios::sync_with_stdio(false);
  int n, sum = 0;
  cin >> n;
  vector<int> vec(n);
  for (int(i) = 0, j1234 = n; (i) < j1234; (i)++) {
    cin >> vec[i];
    sum += vec[i];
  }
  bool dir = false;
  string ans;
  for (int i = 0; i < n;) {
    if (sum == 0) break;
    if ((i == 0 && dir) || (i == n - 1 && !dir)) dir ^= true;
    if (vec[i]) {
      sum--;
      vec[i]--;
      ans.push_back('P');
    }
    if (!dir) {
      i++;
      ans.push_back('R');
    } else {
      i--;
      ans.push_back('L');
    }
  }
  cout << ans << endl;
  return 0;
}
