#include <bits/stdc++.h>
using namespace std;
int n, x;
vector<int> v;
string s;
char c;
bool isEmpty() { return (*max_element(v.begin(), v.end()) == 0); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (auto i = 0; i <= n - 1; i++) {
    cin >> x;
    v.push_back(x);
  }
  c = 'R';
  while (!isEmpty()) {
    for (auto i = 0; i <= n - 2; i++) {
      if (v[i] > 0) {
        v[i]--;
        s.push_back('P');
        s.push_back(c);
      } else
        s.push_back(c);
    }
    reverse(v.begin(), v.end());
    c == 'R' ? c = 'L' : c = 'R';
  }
  cout << s;
}
