#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, s, f;
  scanf("%d", &n);
  ;
  scanf("%d", &m);
  ;
  scanf("%d", &s);
  ;
  scanf("%d", &f);
  ;
  vector<pair<int, pair<int, int> > > a(m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i].first);
    ;
    scanf("%d", &a[i].second.first);
    ;
    scanf("%d", &a[i].second.second);
    ;
  }
  char move;
  int dir;
  if (s < f) {
    move = 'R';
    dir = 1;
  } else {
    move = 'L';
    dir = -1;
  }
  string ss;
  int x = 1, ind = 0;
  while (1) {
    if (f == s) break;
    if (a[ind].first == x) {
      if ((s <= a[ind].second.second && s >= a[ind].second.first) ||
          (s + dir >= a[ind].second.first && s + dir <= a[ind].second.second)) {
        ss += "X";
      } else {
        ss += move;
        s += dir;
      }
      ind++;
    } else {
      ss += move;
      s += dir;
    }
    x++;
  }
  cout << ss << endl;
  return 0;
}
