#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, s, f;
  cin >> n >> m >> s >> f;
  int a[m][3];
  for (int i = 0; i < m; i++) {
    cin >> a[i][0] >> a[i][1] >> a[i][2];
  }
  int k = 0;
  for (int i = 0;; i++) {
    if (s == f) {
      break;
    }
    if (f > s) {
      if (a[k][0] == i + 1) {
        if (((a[k][1] <= s + 1) && (a[k][2] >= s + 1)) ||
            ((a[k][1] <= s) && (a[k][2] >= s))) {
          cout << "X";
          k++;
          continue;
        }
        k++;
      }
      s++;
      cout << "R";
    } else {
      if (a[k][0] == i + 1) {
        if (((a[k][1] <= s - 1) && (a[k][2] >= s - 1)) ||
            ((a[k][1] <= s) && (a[k][2] >= s))) {
          cout << "X";
          k++;
          continue;
        }
        k++;
      }
      s--;
      cout << "L";
    }
  }
  return 0;
}
