#include <bits/stdc++.h>
using namespace std;
int a[500], b[500];
int main() {
  int i, n, l, r, cnt, uk = 0, kol = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] != 0) kol++;
  }
  l = 0;
  r = n - 1;
  cnt = 0;
  if (a[0] > 0) {
    cout << "P";
    if (a[0] == 1) cnt++;
    b[0]++;
  }
  while (cnt < kol) {
    while (cnt < kol && uk < n - 1) {
      uk++;
      cout << "R";
      if (b[uk] == a[uk] - 1) cnt++;
      if (b[uk] < a[uk]) {
        b[uk]++;
        cout << "P";
      }
    }
    while (cnt < kol && uk > 0) {
      uk--;
      cout << "L";
      if (b[uk] == a[uk] - 1) cnt++;
      if (b[uk] < a[uk]) {
        b[uk]++;
        cout << "P";
      }
    }
  }
  return 0;
}
