#include <bits/stdc++.h>
int main(void) {
  int n, m, s, f, c, t = 0, l, r;
  scanf("%d %d %d %d", &n, &m, &s, &f);
  int d = s < f ? 1 : -1;
  for (c = 1; s != f; c++) {
    if (c > t && m) scanf("%d %d %d", &t, &l, &r), m--;
    if (c != t || (s < l || s > r) && (s + d < l || s + d > r))
      s += d, putchar(d == 1 ? 'R' : 'L');
    else
      putchar('X');
  }
}
