#include <bits/stdc++.h>
using namespace std;
long long n, i, ans;
int main() {
  cin >> n;
  int a[n + 1];
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] != 0) ans += a[i];
  }
  long long ans1 = ans;
  while (ans > 0) {
    for (i = 1; i <= n; i++) {
      if (a[i] != 0 && (ans1 == ans || i != 1)) {
        a[i]--;
        ans--;
        cout << 'P';
      }
      if (i != n) cout << 'R';
    }
    for (i = n; i >= 1; i--) {
      if (a[i] != 0 && i != n) {
        a[i]--;
        ans--;
        cout << 'P';
      }
      if (i != 1) cout << 'L';
    }
  }
  return 0;
}
