#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n = 0;
  cin >> n;
  vector<int> a(n);
  int sum = 0;
  for (int i = 0; i < (int)n; ++i) {
    cin >> a[i];
    sum += a[i];
  }
  int cur = 0;
  int turn = 1;
  string ans;
  while (sum) {
    if (a[cur]) {
      ans.push_back('P');
      --a[cur];
      --sum;
    }
  lab:
    if (cur + turn >= 0 && cur + turn < n) {
      cur += turn;
      if (turn > 0)
        ans.push_back('R');
      else
        ans.push_back('L');
    } else {
      turn *= -1;
      goto lab;
    }
  }
  cout << ans << endl;
  return 0;
}
