#include <bits/stdc++.h>
using namespace std;
long long int inf = 1e18;
long long int p = 998244353;
long long int phi(long long int n) {
  long long int result = n;
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int i, j, y, x, k, z, w, g, m, a, b, t, c, key, q, l, r, n;
  long long int t2, t3, t4, t1;
  char temp;
  long long int s, f;
  cin >> n >> m >> s >> f;
  string out;
  map<long long int, pair<long long int, long long int> > ma;
  while (m--) {
    cin >> x >> y >> z;
    ma[x] = make_pair(y, z);
  }
  long long int ans = 1;
  if (s < f) {
    while (1) {
      if (s == f) break;
      t1 = ma[ans].first;
      t2 = ma[ans].second;
      if ((s >= t1 && s <= t2) || (s + 1 >= t1 && s + 1 <= t2)) {
        ans++;
        out.push_back('X');
      } else {
        ans++;
        out.push_back('R');
        s++;
      }
    }
  } else {
    while (1) {
      if (s == f) break;
      t1 = ma[ans].first;
      t2 = ma[ans].second;
      if ((s >= t1 && s <= t2) || (s - 1 >= t1 && s - 1 <= t2)) {
        ans++;
        out.push_back('X');
      } else {
        ans++;
        out.push_back('L');
        s--;
      }
    }
  }
  cout << out;
  return 0;
}
