#include <bits/stdc++.h>
using namespace std;
int main() {
  int watchList[100005][2], t[100005], pos, i, time, s, f, n, m;
  char ch;
  string result;
  scanf("%d %d %d %d", &n, &m, &s, &f);
  for (i = 0; i < m; i++)
    scanf("%d %d %d", &t[i], &watchList[i][0], &watchList[i][1]);
  time = 1, i = 0;
  while (s != f) {
    if (s < f)
      ch = 'R', pos = s + 1;
    else
      ch = 'L', pos = s - 1;
    if (time == t[i]) {
      if ((pos >= watchList[i][0] && pos <= watchList[i][1]) ||
          (s >= watchList[i][0] && s <= watchList[i][1]))
        ch = 'X';
      i++;
    }
    if (ch != 'X') s = pos;
    result += ch;
    time++;
  }
  printf("%s\n", result.c_str());
  return 0;
}
