#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, arr[100000], arr1[100000];
  cin >> n;
  string s = "";
  for (int x = 0; x < n; x++) cin >> arr[x], arr1[x] = arr[x];
  sort(arr1, arr1 + n);
  for (int x = 0; x <= arr1[n - 1]; x++) {
    for (int y = 0; y < n - 1; y++) {
      if (arr[y] != 0) s += "P", arr[y]--;
      s += "R";
    }
    for (int z = n - 1; z > 0; z--) {
      if (arr[z] != 0) s += "P", arr[z]--;
      s += "L";
    }
  }
  for (int x = s.size(); x >= 0; x--)
    if (s[x] == 'P') {
      s.erase(x + 1, s.size());
      break;
    }
  cout << s;
  return 0;
}
