#include <bits/stdc++.h>
int a[100006][3];
int main() {
  int n, m, s, f, dir, i;
  scanf("%d%d%d%d", &n, &m, &s, &f);
  if (s < f)
    dir = 1;
  else
    dir = -1;
  for (i = 0; i < m; i++) {
    scanf("%d%d%d", &a[i][0], &a[i][1], &a[i][2]);
  }
  i = 0;
  int t = 1;
  while (f != s) {
    if (a[i][0] == t) {
      if ((a[i][1] <= s and a[i][2] >= s) or
          (a[i][1] <= s + dir and a[i][2] >= s + dir)) {
        printf("X");
      } else {
        if (dir > 0)
          printf("R");
        else
          printf("L");
        s += dir;
      }
      i++;
    } else {
      if (dir > 0)
        printf("R");
      else
        printf("L");
      s += dir;
    }
    t++;
  }
}
