#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream& operator>>(istream& in, vector<T>& arr) {
  for (T& i : arr) {
    in >> i;
  }
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<vector<T>>& arr) {
  for (vector<T>& i : arr) {
    out << i;
  }
  out << endl;
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T>& arr) {
  for (T& i : arr) {
    out << i << ' ';
  }
  out << endl;
  return out;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += a[i];
  }
  int cur_pos = 0;
  bool right = true;
  string ans;
  for (;;) {
    if (a[cur_pos]) {
      ans += 'P';
      a[cur_pos]--;
      sum--;
      if (sum == 0) {
        break;
      }
    }
    if (right) {
      cur_pos++;
      if (cur_pos == a.size()) {
        cur_pos -= 2;
        right = false;
        ans += 'L';
      } else {
        ans += 'R';
      }
    } else {
      cur_pos--;
      if (cur_pos < 0) {
        cur_pos += 2;
        right = true;
        ans += 'R';
      } else {
        ans += 'L';
      }
    }
  }
  cout << ans;
}
