#include <bits/stdc++.h>
const double pi = 3.141592653589793238462;
const double eps = 1e-10;
using namespace std;
const int maxn = 100010;
int t[maxn], l[maxn], r[maxn];
int main() {
  int i, j, k, n, m, tc, s, f;
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> s >> f;
  for (i = 0; i < m; i++) cin >> t[i] >> l[i] >> r[i];
  k = 1;
  i = 0;
  while (s != f) {
    if (s < f && (t[i] != k || (t[i] == k && (r[i] < s || l[i] > s + 1)))) {
      cout << "R";
      s++;
    } else if (s > f &&
               (t[i] != k || (t[i] == k && (r[i] < s - 1 || l[i] > s)))) {
      cout << "L";
      s--;
    } else
      cout << "X";
    if (t[i] == k) i++;
    k++;
  }
  cout << endl;
  return 0;
}
