#include <bits/stdc++.h>
using namespace std;
const int maxm = 2000000 + 10;
const int maxn = 300 + 10;
char s[maxm];
int a[maxn];
int b[maxn];
int n;
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
    memset(b, 0, sizeof(b));
    int l = 0;
    int cnt = 0;
    int dig = 1;
    while (l != n) {
      if (l == dig - 1 && a[dig] <= b[dig]) l += 1;
      if (l == n) break;
      if (a[dig] > b[dig]) {
        s[cnt++] = 'P';
        b[dig] += 1;
        if (l == dig - 1 && a[dig] <= b[dig]) l += 1;
        if (l == n) break;
      }
      if (dig == n || l + 1 < dig) {
        s[cnt++] = 'L';
        dig -= 1;
      } else {
        s[cnt++] = 'R';
        dig += 1;
      }
    }
    s[cnt++] = 0;
    puts(s);
  }
  return 0;
}
