#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, s, f;
  scanf("%d%d%d%d", &n, &m, &s, &f);
  int i;
  int x[m][3];
  for (i = 0; i < m; i++) {
    scanf("%d%d%d", &x[i][0], &x[i][1], &x[i][2]);
  }
  int step = 1;
  int add;
  int current = s;
  if (s < f) {
    add = 1;
  } else {
    add = -1;
  }
  int observing = 0;
  while (1) {
    if (current == f) {
      break;
    } else {
      if (x[observing][0] == step) {
        if ((current + add <= x[observing][2] &&
             current + add >= x[observing][1]) ||
            (current <= x[observing][2] && current >= x[observing][1])) {
          printf("X");
        } else if ((current + add > x[observing][2] ||
                    current + add < x[observing][1]) &&
                   (current > x[observing][2] || current < x[observing][1])) {
          if (add == -1) {
            printf("L");
            current--;
          } else {
            printf("R");
            current++;
          }
        }
        step++;
        observing++;
      } else {
        if (x[observing][0] < step) {
          if (add == -1) {
            printf("L");
            current--;
          } else {
            printf("R");
            current++;
          }
          step++;
        } else if (x[observing][0] > step) {
          if (add == -1) {
            printf("L");
            current--;
          } else {
            printf("R");
            current++;
          }
          step++;
        }
      }
    }
  }
  printf("\n");
  return 0;
}
