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