#include <bits/stdc++.h>
using namespace std;
const int M = 110000;
int t[M], l[M], r[M];
char ans[2 * M];
int main() {
  int i;
  int n, m, s, f;
  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]);
  int k = 0, cr = 0, ds;
  while (s != f) {
    if (s < f)
      ds = 1;
    else
      ds = -1;
    int fl = 1;
    if (t[cr] - 1 == k) {
      if ((l[cr] <= s + ds && r[cr] >= s + ds) || (l[cr] <= s && r[cr] >= s)) {
        fl = 0;
        ans[k] = 'X';
      }
      cr++;
    }
    if (fl) {
      if (ds < 0)
        ans[k] = 'L';
      else
        ans[k] = 'R';
      s += ds;
    }
    k++;
  }
  ans[k] = '\0';
  printf("%s\n", ans);
  return 0;
}
