#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
int main() {
  int n, total = 0, a[300];
  int now = 0;
  bool face_right = true;
  char prev = '\0';
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    total += a[i];
  }
  while (total)
    if (prev != 'P' && a[now]) {
      prev = 'P';
      a[now]--;
      total--;
      cout << prev;
    } else if (face_right) {
      bool found = false;
      for (int i = now + 1; i < n; i++)
        if (a[i]) {
          found = true;
          break;
        }
      if (found) {
        prev = 'R';
        now++;
        cout << prev;
      } else {
        face_right = false;
        bool found2 = false;
        for (int i = now - 1; i >= 0; i--)
          if (a[i]) {
            found2 = true;
            break;
          }
        if (found2) {
          prev = 'L';
          now--;
          cout << prev;
        } else if (now) {
          prev = 'L';
          now--;
          cout << prev;
        } else {
          prev = 'R';
          now++;
          cout << prev;
        }
      }
    } else {
      bool found = false;
      for (int i = now - 1; i >= 0; i--)
        if (a[i]) {
          found = true;
          break;
        }
      if (found) {
        prev = 'L';
        now--;
        cout << prev;
      } else {
        face_right = true;
        bool found2 = false;
        for (int i = now + 1; i < n; i++)
          if (a[i]) {
            found2 = true;
            break;
          }
        if (found2) {
          prev = 'R';
          now++;
          cout << prev;
        } else if (now < n - 1) {
          prev = 'R';
          now++;
          cout << prev;
        } else {
          prev = 'L';
          now--;
          cout << prev;
        }
      }
    }
  return 0;
}
