#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[n], total = 0;
  string ans = "";
  for (int i = 0; i < n; i++) {
    scanf("%d", arr + i);
    total += arr[i];
  }
  int no = 0;
  int dir = 0;
  int i = 0;
  while (no < total) {
    if (!dir) {
      for (; i < n;) {
        if (arr[i]) {
          arr[i]--;
          ans += 'P';
          no++;
        }
        if (no == total) break;
        if (i != n - 1) {
          ans += 'R';
          i++;
        } else {
          ans += 'L';
          i--;
          break;
        }
      }
    } else {
      for (; i >= 0;) {
        if (arr[i]) {
          arr[i]--;
          ans += 'P';
          no++;
        }
        if (no == total) break;
        if (i == 0) {
          ans += 'R';
          i++;
          break;
        } else {
          ans += 'L';
          i--;
        }
      }
    }
    dir = !dir;
  }
  cout << ans << endl;
}
