#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[300 + 100];
  char answer[1000000 + 1000];
  memset(answer, 0, sizeof(answer));
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int p = 1;
  int i = 0;
  for (;;) {
    if (a[p] > 0) {
      a[p]--;
      answer[i++] = 'P';
    }
    if (p == n)
      if (a[p] == 0 && a[p - 1] == 0) break;
    if (p - 1 >= 1 && a[p - 1] > 0) {
      p--;
      answer[i++] = 'L';
      continue;
    }
    if (p + 1 > n) {
      p--;
      answer[i++] = 'L';
      continue;
    }
    {
      p++;
      answer[i++] = 'R';
      continue;
    }
  }
  cout << answer;
  return 0;
}
