#include <bits/stdc++.h>
using namespace std;
int n, m, s, f, t[200000], l[200000], r[200000];
int main() {
  string ans = "";
  int moment = 0, poss;
  cin >> n >> m >> s >> f;
  for (int i = 0; i < m; i++) {
    cin >> t[i] >> l[i] >> r[i];
  }
  while (true) {
    if (s == f) break;
    moment++;
    poss = lower_bound(t, t + m, moment) - t;
    if (t[poss] == moment) {
      if (l[poss] <= s && s <= r[poss]) {
        ans += 'X';
        continue;
      }
      if (s < f && l[poss] <= s + 1 && s + 1 <= r[poss]) {
        ans += 'X';
        continue;
      }
      if (s > f && l[poss] <= s - 1 && s - 1 <= r[poss]) {
        ans += 'X';
        continue;
      }
      if (s < f)
        ans += 'R', s++;
      else
        ans += 'L', s--;
    } else {
      if (s < f)
        ans += 'R', s++;
      else
        ans += 'L', s--;
    }
  }
  cout << ans;
  return 0;
}
