#include <bits/stdc++.h>
int main() {
  int n, i, j, val[310], total, f;
  while ((scanf("%d", &n)) != EOF) {
    for (i = total = 0; i < n; i++) scanf("%d", &val[i]), total += val[i];
    j = 1;
    f = 1;
    i = 0;
    while (total) {
      if (val[i] == 0 || !f) {
        if (f) f = 0;
        if (j == 1 && i + 1 < n) {
          printf("R");
          i++;
          f = 1;
        } else if (j == 1 && i == n - 1) {
          printf("L");
          j = -1;
          f = 1;
          i--;
        } else if (j == -1 && i - 1 >= 0) {
          printf("L");
          j = -1;
          f = 1;
          i--;
        } else if (j == -1 && i == 0) {
          printf("R");
          j = 1;
          f = 1;
          i++;
        }
      } else if (f) {
        val[i]--;
        total--;
        printf("P");
        f = 0;
      }
    }
    printf("\n");
  }
  return 0;
}
