#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, m, s, f;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> s >> f;
  vector<pair<int, pair<int, int> > > v(m + 1);
  for (long long int i = 0; i < int(m); ++i) {
    cin >> v[i].first >> v[i].second.first >> v[i].second.second;
  }
  v[m].first = 1 << 29;
  int last = 0;
  int direction = s < f ? 1 : -1;
  int round = 0;
  char directionC = direction == 1 ? 'R' : 'L';
  vector<char> ans;
  for (int i = 0; i <= m; ++i) {
    int cn = v[i].first - last - 1;
    last = v[i].first;
    int kk = min(abs(s - f), cn);
    for (int i = 0; i < kk; ++i) {
      ans.push_back(directionC);
      s += direction;
    }
    if (s == f) break;
    if ((s < v[i].second.first || s > v[i].second.second) &&
        (s + direction < v[i].second.first ||
         s + direction > v[i].second.second)) {
      ans.push_back(directionC);
      s += direction;
      if (s == f) break;
    } else {
      ans.push_back('X');
    }
  }
  for (int i = 0; i < ans.size(); ++i) {
    cout << (char)ans[i];
  }
  return 0;
}
