#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *A = new int[n];
  int *B = new int[n];
  int SumA = 0;
  int SumB = 0;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    SumA += A[i];
  }
  for (int i = 0; i < n; i++) {
    B[i] = 0;
  }
  char c;
  string str = "";
  while (SumA != SumB) {
    for (int i = 0; i < n - 1; i++) {
      if ((A[i] == 0) || (A[i] == B[i])) {
        c = 'R';
        str += c;
      } else if ((A[i] > 0) && (A[i] != B[i])) {
        c = 'P';
        str += c;
        B[i]++;
        SumB++;
        if (SumB == SumA) {
          cout << str << endl;
          return 0;
        }
        c = 'R';
        str += c;
      }
    }
    for (int i = n - 1; i > 0; i--) {
      if ((A[i] == 0) || (A[i] == B[i])) {
        c = 'L';
        str += c;
      } else {
        c = 'P';
        str += c;
        B[i]++;
        SumB++;
        if (SumB == SumA) {
          cout << str << endl;
          return 0;
        }
        c = 'L';
        str += c;
      }
    }
  }
  cout << str << endl;
  return 0;
}
