#include <bits/stdc++.h>
using namespace std;
int t[100005], l[100005], r[100005];
int main() {
  int n, m, s, f;
  cin >> n >> m >> s >> f;
  int c = s;
  int last = 0;
  for (int i = 0; i < m; i++) cin >> t[i] >> l[i] >> r[i];
  string out = "";
  int ct = 1;
  int k = 0;
  while (s != f) {
    char ch;
    int tt;
    if (s < f) {
      ch = 'R';
      tt = 1;
    } else {
      ch = 'L';
      tt = -1;
    }
    if (ct == t[k]) {
      if ((s >= l[k] && s <= r[k]) || (s + tt >= l[k] && s + tt <= r[k]))
        out += 'X';
      else {
        out += ch;
        s += tt;
      }
      k++;
    } else {
      out += ch;
      s += tt;
    }
    ct++;
  }
  cout << out << endl;
  return 0;
}
