#include <bits/stdc++.h>
using namespace std;
inline void boost() {
  ios_base::sync_with_stdio();
  cin.tie(0);
  cout.tie(0);
}
const long long MAXN = 1e5 + 123;
const long long inf = 1e9 + 123;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
map<int, pair<int, int> > mm;
int main() {
  boost();
  int n, m, s, f;
  cin >> n >> m >> s >> f;
  int it = s;
  for (int i = 1; i <= m; i++) {
    int t, l, r;
    cin >> t >> l >> r;
    mm[t] = make_pair(l, r);
  }
  int cntr = 0;
  while (it != f) {
    cntr++;
    pair<int, int> a = mm[cntr];
    if ((a.first <= it && it <= a.second) ||
        (it < f && a.first <= it + 1 && a.second >= it + 1) ||
        (it - 1 <= a.second && it - 1 >= a.first && it > f)) {
      cout << "X";
    } else {
      if (it < f) {
        it++;
        cout << "R";
      } else {
        it--;
        cout << "L";
      }
    }
  }
  exit(0);
}
