#include <bits/stdc++.h>
using namespace std;
int arr[3001];
string res;
int moveRight(int);
int moveLeft(int);
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  bool flag = 1;
  int i = 0, moves = 0;
  while (flag) {
    moves = 0;
    while (i != n - 1) {
      moves += moveRight(i);
      i++;
    }
    while (i != 0) {
      moves += moveLeft(i);
      i--;
    }
    flag = moves;
  }
  for (int i = res.size(); i; i--) {
    if (res[i] == 'P') break;
    res.erase(i, 1);
  }
  cout << res;
  return 0;
}
int moveRight(int i) {
  if (arr[i]) {
    arr[i]--;
    res += "PR";
    return 1;
  }
  res += "R";
  return 0;
}
int moveLeft(int i) {
  if (arr[i]) {
    arr[i]--;
    res += "PL";
    return 1;
  }
  res += "L";
  return 0;
}
