#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, t;
  int m;
  scanf("%d", &n);
  scanf("%d", &m);
  int s, e;
  scanf("%d", &s);
  scanf("%d", &e);
  map<int, pair<int, int> > a;
  int p, q;
  for (int i = (int)1; i < (int)m + 1; ++i) {
    scanf("%d", &t);
    scanf("%d", &p);
    scanf("%d", &q);
    a[t] = make_pair(p, q);
  }
  t = 1;
  int d;
  if (s > e)
    d = -1;
  else
    d = 1;
  int c;
  c = s;
  p = c + d;
  char ch;
  if (d == 1)
    ch = 'R';
  else
    ch = 'L';
  while (1) {
    if (a.find(t) != a.end()) {
      if (!(c >= a[t].first && c <= a[t].second) &&
          !(p >= a[t].first && p <= a[t].second)) {
        printf("%c", ch);
        c = p;
        p = c + d;
        if (c == e) break;
      } else
        printf("X");
    } else {
      printf("%c", ch);
      c = p;
      p = c + d;
      if (c == e) break;
    }
    t++;
  }
  printf("\n");
  return 0;
}
