#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int A[n], B[n];
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    cin >> A[i];
    B[i] = 0;
    if (A[i] == 0) {
      cnt++;
    }
  }
  while (cnt < n) {
    for (int i = 0; i < n - 1; i++) {
      if (A[i] - B[i] >= 1) {
        cout << "P";
        B[i]++;
        if (A[i] - B[i] == 0) {
          cnt++;
        }
      }
      cout << "R";
    }
    for (int i = n - 1; i > 0; i--) {
      if (A[i] - B[i] >= 1) {
        cout << "P";
        B[i]++;
        if (A[i] - B[i] == 0) {
          cnt++;
        }
      }
      cout << "L";
    }
  }
  return 0;
}
