#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  string ans;
  vector<int> arr(n);
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  int pos = 0, dir = 1;
  while (sum) {
    if (arr[pos]) {
      ans += 'P';
      arr[pos]--;
      sum--;
    }
    if (dir) {
      if (pos == n - 1) {
        ans += 'L';
        pos--;
        dir = 0;
      } else {
        ans += 'R';
        pos++;
      }
    } else {
      if (pos == 0) {
        ans += 'R';
        pos++;
        dir = 1;
      } else {
        ans += 'L';
        pos--;
      }
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cout << fixed << setprecision(20);
  ;
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
}
