#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int t[N], l[N], r[N];
char str[N << 2];
int main() {
  int n, m, s, f, i;
  scanf("%d%d%d%d", &n, &m, &s, &f);
  for (i = 0; i < m; i++) scanf("%d%d%d", &t[i], &l[i], &r[i]);
  t[m] = 2000000000;
  int step = (f > s) ? 1 : -1, now = s, time = 1, len = 0, x = 0;
  while (now != f) {
    while (t[x] < time) x++;
    if (t[x] == time && ((l[x] <= now && r[x] >= now) ||
                         (l[x] <= now + step && r[x] >= now + step)))
      str[len++] = 'X';
    else {
      str[len++] = (f > s) ? 'R' : 'L';
      now += step;
    }
    time++;
  }
  str[len] = '\0';
  printf("%s\n", str);
  return 0;
}
