#include <bits/stdc++.h>
using namespace std;
int a[1000000];
int main() {
  int n, i, j, k, l, p, sum;
  memset(a, -1, sizeof(a));
  scanf("%d", &n);
  sum = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum = sum + a[i];
  }
  p = 1;
  j = 1;
  while (1) {
    if (sum <= 0) break;
    if (p % 2 != 0) {
      for (i = j; i <= n; i++) {
        if (sum <= 0) break;
        if (a[i] != 0) {
          a[i]--;
          printf("P");
          sum--;
          if (sum <= 0) break;
          if (a[i + 1] == -1)
            printf("L");
          else
            printf("R");
        } else if (a[i] == 0) {
          if (a[i + 1] == -1)
            printf("L");
          else {
            printf("R");
          }
        }
      }
      i = i - 2;
    } else {
      for (j = i; j >= 1; j--) {
        if (sum <= 0) break;
        if (a[j] != 0) {
          a[j]--;
          printf("P");
          sum--;
          if (sum <= 0) break;
          if (a[j - 1] == -1)
            printf("R");
          else
            printf("L");
        } else if (a[j] == 0) {
          if (a[j - 1] == -1)
            printf("R");
          else {
            printf("L");
          }
        }
      }
      j = j + 2;
    }
    p++;
  }
  printf("\n");
  return 0;
}
