#include <bits/stdc++.h>
int main() {
  int n, m, s, f, t = 0, l, r, now, pass;
  char pr;
  scanf("%d %d %d %d", &n, &m, &s, &f);
  now = s;
  if (f - s > 0) {
    pr = 'R';
    pass = 1;
  } else {
    pr = 'L';
    pass = -1;
  }
  for (int i = 1; 1; i++) {
    if (i > t) {
      scanf(" %d %d %d", &t, &l, &r);
      m--;
    }
    if (i == t) {
      if ((l <= now && now <= r) || (l <= now + pass && now + pass <= r)) {
        printf("X");
      } else {
        printf("%c", pr);
        now += pass;
      }
    } else {
      printf("%c", pr);
      now += pass;
    }
    if (now == f) {
      printf("\n");
      break;
    }
  }
  while (m-- > 0) scanf(" %d %d %d", &t, &l, &r);
  return 0;
}
