#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  int i;
  for (i = 1; i <= n; i++) cin >> a[i];
  int trip = -1, tot = 0;
  while (tot != n) {
    if (trip == -1) {
      for (i = 1; i <= n; i++) {
        if (a[i] != 0 && i != n) {
          cout << "PR";
          a[i]--;
        } else if (a[i] != 0 && i == n) {
          trip = 0;
          cout << "PL";
          a[i]--;
        } else if (a[i] == 0 && i == n) {
          trip = 0;
          tot++;
          cout << "L";
        } else {
          cout << "R";
          tot++;
        }
      }
    }
    if (trip == 1) {
      if (a[1] == 0)
        tot = 1;
      else
        tot = 0;
      for (i = 2; i <= n; i++) {
        if (a[i] != 0 && i != n) {
          cout << "PR";
          a[i]--;
        } else if (a[i] != 0 && i == n) {
          trip = 0;
          cout << "PL";
          a[i]--;
        } else if (a[i] == 0 && i == n) {
          trip = 0;
          tot++;
          cout << "L";
        } else {
          cout << "R";
          tot++;
        }
      }
    } else if (trip == 0) {
      if (a[n] == 0)
        tot = 1;
      else
        tot = 0;
      for (i = n - 1; i >= 1; i--) {
        if (a[i] != 0 && i != 1) {
          cout << "PL";
          a[i]--;
        } else if (a[i] != 0 && i == 1) {
          trip = 1;
          cout << "PR";
          a[i]--;
        } else if (a[i] == 0 && i == 1) {
          trip = 1;
          tot++;
          cout << "R";
        } else {
          cout << "L";
          tot++;
        }
      }
    }
  }
  return 0;
}
