#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1000], ans[1000], n;
  char s[100009];
  int sum = 0;
  while (cin >> n) {
    sum = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      sum += a[i];
    }
    int temp = sum, pos = 1;
    int flag = 1;
    while (temp) {
      if (a[pos] > 0) {
        sum--;
        a[pos]--;
        cout << "P";
        if (sum == 0) break;
      }
      if (pos == n) flag = -1;
      if (pos == 1) flag = 1;
      if (flag == 1)
        cout << "R";
      else
        cout << "L";
      pos += flag;
    }
    cout << endl;
  }
  return 0;
}
