#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int dir = 0;
  int count;
  for (int i = 0; i < n; i++) {
    count = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] == 0) count += 1;
    }
    if (count == n) {
      break;
    }
    if (a[i] == 0) {
      if (i != n - 1 && dir == 0) {
        cout << "R";
        continue;
      }
      if (i != n - 1 && dir == 1) {
        if (i != 0) {
          cout << "L";
          i -= 2;
          continue;
        }
        if (i == 0) {
          cout << "R";
          dir = 0;
          continue;
        }
      }
      if (i == n - 1) {
        cout << "L";
        i -= 2;
        dir = 1;
        continue;
      }
    }
    cout << "P";
    a[i] -= 1;
    if (a[i] == 0) {
      count += 1;
    }
    if (count == n) {
      break;
    }
    if (i != n - 1 && dir == 0) {
      cout << "R";
      continue;
    }
    if (i != n - 1 && dir == 1) {
      if (i != 0) {
        cout << "L";
        i -= 2;
        continue;
      }
      if (i == 0) {
        cout << "R";
        dir = 0;
        continue;
      }
    }
    if (i == n - 1) {
      cout << "L";
      i -= 2;
      dir = 1;
      continue;
    }
  }
  cout << endl;
  return 0;
}
