#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, s, f;
  cin >> n >> m >> s >> f;
  map<int, pair<int, int> > ma;
  map<int, pair<int, int> >::iterator it;
  long long a, b, c;
  string ans = "";
  for (long long int i = 0; i < m; i++) {
    cin >> a >> b >> c;
    ma[a] = make_pair(b, c);
  }
  if (s < f) {
    long long i = 1;
    while (s != f) {
      it = ma.find(i);
      if (it == ma.end()) {
        ans += "R";
        s++;
      } else {
        if ((s < it->second.first || s > it->second.second) &&
            (s + 1 < it->second.first || s + 1 > it->second.second)) {
          ans += "R";
          s++;
        } else
          ans += "X";
      }
      i++;
    }
  } else {
    long long i = 1;
    while (s != f) {
      it = ma.find(i);
      if (it == ma.end()) {
        ans += "L";
        s--;
      } else {
        if ((s < it->second.first || s > it->second.second) &&
            (s - 1 < it->second.first || s - 1 > it->second.second)) {
          ans += "L";
          ;
          s--;
        } else
          ans += "X";
      }
      i++;
    }
  }
  cout << ans;
}
