#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxN = 1e5 + 10;
int n, m, s, f;
int t[maxN], l[maxN], r[maxN];
bool inside(int l, int m, int r) { return l <= m && m <= r; }
void slv() {
  int d = f > s ? 1 : -1;
  m++;
  t[m] = inf, l[m] = inf, r[m] = -inf;
  int tm = 1;
  int p = 1;
  while (true) {
    if (s == f) break;
    if (tm != t[p])
      s += d, printf("%c", d > 0 ? 'R' : 'L');
    else {
      if (inside(l[p], s, r[p]) || inside(l[p], s + d, r[p]))
        printf("X");
      else
        printf("%c", d > 0 ? 'R' : 'L'), s += d;
      p++;
    }
    tm++;
  }
}
int main() {
  while (~scanf("%d%d%d%d", &n, &m, &s, &f)) {
    for (int i = 1; i <= m; i++) scanf("%d%d%d", &t[i], &l[i], &r[i]);
    slv();
  }
  return 0;
}
