#include <bits/stdc++.h>
using namespace std;
int n, m, s, e;
map<int, pair<int, int> > col;
char ans[200100];
inline bool in(int k, pair<int, int> avg) {
  return (avg.first <= k && k <= avg.second);
}
int main() {
  scanf("%d%d%d%d", &n, &m, &s, &e);
  col.clear();
  int a, b, c;
  for (int i = 0; i < m; i++) {
    scanf("%d%d%d", &a, &b, &c);
    col[a] = make_pair(b, c);
  }
  int val = 0;
  char ch;
  if (s < e) {
    val = 1;
    ch = 'R';
  } else {
    val = -1;
    ch = 'L';
  }
  map<int, pair<int, int> >::iterator ite;
  int state = s;
  for (int i = 1; i < 200100; i++) {
    if (state == e) {
      ans[i] = 0;
      break;
    }
    pair<int, int> avg;
    if (col.end() != (ite = col.find(i)))
      avg = ite->second;
    else
      avg = make_pair(-1, -1);
    if (!in(state, avg) && !in(state + val, avg)) {
      ans[i] = ch;
      state += val;
    } else
      ans[i] = 'X';
  }
  printf("%s", ans + 1);
  return 0;
}
