#include <bits/stdc++.h>
using namespace std;
int s, f, n, m;
int t[100300], x[100300], y[100300];
int main() {
  scanf("%d %d %d %d", &n, &m, &s, &f);
  for (int i = 0; i < m; i++) scanf("%d %d %d", &t[i], &x[i], &y[i]);
  string res = "";
  int next = 0;
  int tiempo = 1;
  int cur = 0;
  char ch;
  while (s != f) {
    if (s < f) {
      ch = 'R';
      next = s + 1;
    } else {
      ch = 'L';
      next = s - 1;
    }
    if (cur < m && t[cur] == tiempo) {
      if (next >= x[cur] && next <= y[cur]) {
        ch = 'X';
        next = s;
      }
      if (s >= x[cur] && s <= y[cur]) {
        ch = 'X';
        next = s;
      }
      cur++;
    }
    res += ch;
    s = next;
    tiempo++;
  }
  cout << res << endl;
  return 0;
}
