#include <bits/stdc++.h>
using namespace std;
int n, a[305];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  int left = 0, now = 0;
  while (left < n) {
    if (a[now]) {
      printf("%c", 'P');
      a[now]--;
    }
    if (a[left] == 0) left++;
    if (now > left || now == n - 1) {
      now--;
      printf("%c", 'L');
    } else {
      now++;
      printf("%c", 'R');
    }
  }
  printf("\n");
  return 0;
}
