#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, pair<int, int> > mp;
  string move = "LRX";
  int n, m, s, f, temp, counter = 1;
  cin >> n >> m >> s >> f;
  for (int i = 0; i < m; i++) {
    cin >> temp;
    cin >> mp[temp].first;
    cin >> mp[temp].second;
  }
  temp = 1;
  if (s > f) {
    temp = 0;
    counter = -1;
  }
  for (int i = 1; s != f; i++) {
    if (mp[i].first && mp[i].second) {
      if ((s < mp[i].first || s > mp[i].second) &&
          (s + counter < mp[i].first || s + counter > mp[i].second))
        cout << move[temp];
      else {
        cout << move[2];
        s -= counter;
      }
    } else
      cout << move[temp];
    s += counter;
  }
}
