#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
const long long mod = 1e9 + 7;
int n, ans;
int a[maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    ans += a[i] > 0 ? 1 : 0;
  }
  int index = 1;
  while (1) {
    if (a[index] > 0) {
      cout << "P";
      a[index]--;
      if (a[index] == 0) ans--;
    }
    if (ans == 0) break;
    if (index > 1) {
      if (a[index - 1] > 0) {
        index--;
        cout << "L";
      } else if (index < n) {
        index++;
        cout << "R";
      } else {
        index--;
        cout << "L";
      }
    } else {
      index++;
      cout << "R";
    }
  }
  return 0;
}
