#include <bits/stdc++.h>
using namespace std;
long long int MAX = 1e9, max_int = 1e6;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, s, f, t, i;
  string ans = "";
  cin >> n >> m >> s >> f;
  map<long long, long long> l, r;
  for (i = 0; i < m; i++) {
    cin >> t;
    cin >> l[t];
    cin >> r[t];
  }
  i = 1;
  t = s;
  while (1) {
    if (l[i] > 0) {
      if (f < t) {
        if ((t < l[i]) || (t > r[i] + 1)) {
          cout << "L";
          t--;
        } else
          cout << "X";
      } else if (f > t) {
        if ((t > r[i]) || (t < l[i] - 1)) {
          cout << "R";
          t++;
        } else
          cout << "X";
      } else {
        return 0;
      }
    } else {
      if (f < t) {
        cout << "L";
        t--;
      } else if (f > t) {
        cout << "R";
        t++;
      } else
        return 0;
    }
    i++;
  }
}
