#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:60777216")
using namespace std;
const double EPS = 1e-9;
const int MOD = int(1e9) + 7;
const double PI = acos(-1.0);
template <class T>
void printV(vector<T> a) {
  for (int _n = int((a).size()), i = 0; i < _n; ++i) cout << a[i] << " ";
  cout << endl;
}
template <class T>
void printA(T a[], int n) {
  for (int _n = n, i = 0; i < _n; ++i) cout << a[i] << " ";
  cout << endl;
}
template <class T>
void printVV(vector<vector<T> > a) {
  for (int _n = int((a).size()), i = 0; i < _n; ++i) {
    for (int _n = int((a[0]).size()), j = 0; j < _n; ++j)
      cout << a[i][j] << " ";
    cout << endl;
  }
}
template <class T>
void printAA(T **a, int n, int m) {
  for (int _n = n, i = 0; i < _n; ++i) {
    for (int _n = m, j = 0; j < _n; ++j) cout << a[i] << " ";
    cout << endl;
  }
}
const int N = 100000;
map<int, pair<int, int> > mp;
int main() {
  int n, m, f, s;
  cin >> n >> m >> s >> f;
  for (int _n = m, i = 0; i < _n; ++i) {
    int t, x, y;
    cin >> t >> x >> y;
    mp[t] = make_pair(x, y);
  }
  string ans = "";
  if (s < f) {
    int cur = s;
    for (int t = (1), _b = (1000000); t < _b; ++t) {
      if (cur == f) {
        break;
      }
      int toMove = true;
      if (mp.find(t) != mp.end()) {
        int x = mp[t].first;
        int y = mp[t].second;
        if (cur >= x && cur <= y) {
          toMove = false;
        }
        if (cur + 1 >= x && cur + 1 <= y) {
          toMove = false;
        }
      }
      if (toMove) {
        cur++;
        ans += 'R';
      } else {
        ans += 'X';
      }
    }
  } else {
    int cur = s;
    for (int t = (1), _b = (1000000); t < _b; ++t) {
      if (cur == f) {
        break;
      }
      int toMove = true;
      if (mp.find(t) != mp.end()) {
        int x = mp[t].first;
        int y = mp[t].second;
        if (cur >= x && cur <= y) {
          toMove = false;
        }
        if (cur - 1 >= x && cur - 1 <= y) {
          toMove = false;
        }
      }
      if (toMove) {
        cur--;
        ans += 'L';
      } else {
        ans += 'X';
      }
    }
  }
  cout << ans << endl;
  return 0;
}
