#include <bits/stdc++.h>
int n, d[300];
int main() {
  scanf("%d", &n);
  int s = 0;
  for (int i = 0; i < n; i++) scanf("%d", &d[i]), s += d[i];
  int ans = 0;
  int x = 0;
  while (true) {
    if (d[x]) {
      printf("P");
      d[x]--;
      s--;
      if (!s) break;
    }
    if (x && d[x - 1] || x == n - 1) {
      printf("L");
      x--;
    } else {
      printf("R");
      x++;
    }
  }
  return 0;
}
