#include <bits/stdc++.h>
using namespace std;
struct watch {
  long long l, r;
};
int main() {
  int n, m, f, s, z;
  cin >> n >> m >> f >> s;
  map<long long, watch> mapa;
  watch tmp;
  for (int i = 0; i < m; i++) {
    cin >> z;
    cin >> tmp.l;
    cin >> tmp.r;
    mapa[z] = tmp;
  }
  if (f < s) {
    int pos = f;
    for (int t = 1; pos < s; t++) {
      if ((pos >= mapa[t].l && pos <= mapa[t].r) ||
          (pos + 1 >= mapa[t].l && pos + 1 <= mapa[t].r)) {
        cout << "X";
      } else {
        cout << "R";
        pos++;
      }
    }
  } else {
    int pos = f;
    for (int t = 1; pos != s; t++) {
      if ((pos >= mapa[t].l && pos <= mapa[t].r) ||
          (pos - 1 >= mapa[t].l && pos - 1 <= mapa[t].r)) {
        cout << "X";
      } else {
        cout << "L";
        pos--;
      }
    }
  }
  cout << endl;
  return 0;
}
