#include <bits/stdc++.h>
using namespace std;
int dx8[8] = {-1, 1, 0, 0, 1, 1, -1, -1};
int dy8[8] = {0, 0, 1, -1, 1, -1, 1, -1};
void file() {}
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int check(long long x) {
  long long sum = 0;
  long long x1 = x;
  while (x1 != 0) {
    sum += x1 % 10;
    x1 /= 10;
  }
  return sum;
}
int main() {
  int n, m, s, f, si, nxt;
  cin >> n >> m >> s >> f;
  vector<int> t(m), l(m), r(m);
  for (int i = 0; i < m; i++) cin >> t[i] >> l[i] >> r[i];
  if (f - s > 0)
    si = 1;
  else
    si = -1;
  for (int i = 1, j = 0; s != f; i++) {
    nxt = s + si;
    if (j < m && t[j] == i) {
      if ((s >= l[j] && s <= r[j]) || (nxt >= l[j] && nxt <= r[j]))
        cout << 'X';
      else {
        s = nxt;
        if (si > 0)
          cout << 'R';
        else
          cout << 'L';
      }
      j++;
    } else {
      s = nxt;
      if (si > 0)
        cout << 'R';
      else
        cout << 'L';
    }
  }
}
