#include <bits/stdc++.h>
using namespace std;
const int MAXN = 301;
int main() {
  string s;
  int n, a[MAXN], b[MAXN] = {0}, cnt = 0, sum = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  int cur = 1;
  while (cnt < sum) {
    if (a[cur] > b[cur]) {
      s += 'P';
      ++cnt;
      if (cnt == sum) break;
      ++b[cur];
      if (cur - 1 >= 1 && a[cur - 1] > b[cur - 1]) {
        s += 'L';
        --cur;
      } else if (cur + 1 <= n) {
        s += 'R';
        ++cur;
      } else if (cur - 1 >= 1) {
        s += 'L';
        --cur;
      }
    } else if (cur - 1 >= 1 && a[cur - 1] > b[cur - 1]) {
      s += 'L';
      --cur;
    } else if (cur + 1 <= n) {
      s += 'R';
      ++cur;
    }
  }
  cout << s << endl;
  return 0;
}
