#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int t[maxn], l[maxn], r[maxn];
bool judge(int x, int y, int z) {
  if (z < x) return true;
  if (z > y) return true;
  return false;
}
bool judge2(int x, int y, int z) {
  if (judge(x, y, z) && judge(x, y, z + 1)) return true;
  return false;
}
bool judge3(int x, int y, int z) {
  if (judge(x, y, z) && judge(x, y, z - 1)) return true;
  return false;
}
int main() {
  int n, m, s, f;
  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]);
    int tot = 1;
    for (int i = 1; s != f; i++) {
      int t1, t2;
      t1 = t2 = 0;
      if (t[tot] == i) {
        t1 = l[tot];
        t2 = r[tot];
        tot++;
      }
      if (f > s) {
        if (judge2(t1, t2, s))
          putchar('R'), s++;
        else
          putchar('X');
      } else {
        if (judge3(t1, t2, s))
          putchar('L'), s--;
        else
          putchar('X');
      }
    }
    puts("");
  }
  return 0;
}
