#include <bits/stdc++.h>
using namespace std;
int n, a[320], tol = 0;
void move(int x) {
  if (a[x] > 0) {
    printf("P");
    a[x]--;
    tol--;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    tol += a[i];
  }
  int pat = 0;
  int l = 0;
  int r = n - 1;
  while (tol > 0) {
    while (l < r) {
      move(l);
      if (tol > 0) printf("R");
      l++;
    }
    if ((l == r)) {
      while (l > pat) {
        move(l);
        if (tol > 0) printf("L");
        l--;
      }
    }
  }
}
