#include <bits/stdc++.h>
int A[1111];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  while (1) {
    int ok = false;
    for (int i = 0; i < n; i++) {
      if (A[i]) {
        ok = true;
        putchar('P');
        A[i]--;
      }
      if (i < n - 1) putchar('R');
    }
    for (int i = 0; i < n - 1; i++) {
      putchar('L');
    }
    if (!ok) break;
  }
  putchar('\n');
  fprintf(stderr, "Execution time: %.3lf s.\n",
          (double)clock() / CLOCKS_PER_SEC);
  return 0;
}
