#include <bits/stdc++.h>
using namespace std;
map<int, int> L, R;
int main() {
  int n, m, s, t;
  while (scanf("%d%d%d%d", &n, &m, &s, &t) == 4) {
    L.clear(), R.clear();
    for (int i = 0; i < (m); i++) {
      int a, b, x;
      scanf("%d%d%d", &x, &a, &b);
      L[x] = a, R[x] = b;
    }
    int dx = (s < t ? 1 : -1), Time = 1;
    while (s != t) {
      bool ok1 = 0, ok2 = 0;
      if (!L.count(Time))
        ok1 = 1;
      else if (!(L[Time] <= s && s <= R[Time]))
        ok1 = 1;
      if (!L.count(Time))
        ok2 = 1;
      else if (!(L[Time] <= (s + dx) && (s + dx) <= R[Time]))
        ok2 = 1;
      if (ok1 && ok2)
        s += dx, printf("%s", dx == 1 ? "R" : "L");
      else
        printf("X");
      Time++;
    }
    puts("");
  }
}
