#include <bits/stdc++.h>
using namespace std;
long long INF = 1000000007;
long long INFLL = (long long)INF * (long long)INF;
long double EPS = 10e-9;
long double pi = 2 * acos(0.0);
long long n, m, s, f;
map<long long, long long> L, R;
void solve() {
  cin >> n >> m >> s >> f;
  for (long long i = 1; i <= m; i++) {
    long long t, l, r;
    cin >> t >> l >> r;
    L[t] = l;
    R[t] = r;
  }
  for (long long i = 1;; i++) {
    if (s == f) break;
    if (s < f) {
      if (max(L[i], s) <= min(R[i], s + 1))
        cout << "X";
      else
        cout << "R", s++;
    } else {
      if (max(L[i], s - 1) <= min(R[i], s))
        cout << "X";
      else
        cout << "L", s--;
    }
  }
}
int32_t main() {
  clock_t start, end;
  start = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  end = clock();
  double time_taken = double(end - start) / double(CLOCKS_PER_SEC);
  cerr << "\nTime taken by program is : " << fixed << time_taken
       << setprecision(5);
  cerr << " sec "
       << "\n";
  return 0;
}
