#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, c = 0, d = 0;
  cin >> a;
  int b[a];
  for (int i = 0; i < a; i++) {
    cin >> b[i];
    c += b[i];
  }
  while (c > 0) {
    for (int i = 0; i < (a - 1); i++) {
      if (b[i] > 0) {
        b[i] -= 1;
        c--;
        cout << "P";
        if (c == 0) {
          break;
        }
      }
      cout << "R";
      d++;
    }
    if (c == 0) {
      break;
    }
    for (int i = d; i > 0; i--) {
      if (b[i] > 0) {
        b[i] -= 1;
        c--;
        cout << "P";
        if (c == 0) {
          break;
        }
      }
      cout << "L";
      d--;
    }
  }
  return 0;
}
