#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int pos = 0;
  int can = true;
  while (true) {
    bool has = false;
    for (int i = 0; i < n && !has; i++)
      if (a[i] > 0) has = true;
    if (!has) break;
    if (!a[pos] || !can) {
      int to = -1;
      for (int i = 0; i < n; i++) {
        if (a[i] > 0 && i != pos) to = i;
      }
      if (to == -1) {
        if (pos > 0) to = pos - 1;
        if (pos == 0) to = 1;
      }
      if (pos > to) {
        while (to < pos) {
          cout << "L";
          pos--;
        }
      } else {
        while (to > pos) {
          cout << "R";
          pos++;
        }
      }
      can = true;
    } else {
      cout << "P";
      a[pos]--;
      can = false;
    }
  }
  return 0;
}
