#include <bits/stdc++.h>
using namespace std;
int n;
int a[500];
int tot;
int ss;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    ss += a[i];
  }
  int loc = 1;
  while (tot != ss) {
    if (a[loc]) {
      printf("P");
      a[loc]--;
      tot++;
    }
    if (loc && a[loc - 1] || loc == n) {
      loc--;
      printf("L");
    } else {
      loc++;
      printf("R");
    }
  }
}
