#include <bits/stdc++.h>
using namespace std;
int main() {
  int x = 1, y = 0, z = 0, a, b, c, d, e, f, g;
  cin >> a >> b >> c >> d;
  while (c != d) {
    scanf("%d%d%d", &e, &f, &g);
    while (x != e) {
      if (c == d) {
        return 0;
      }
      if (c < d) {
        printf("R");
        c++;
      } else {
        printf("L");
        c--;
      }
      x++;
    }
    if (c == d) {
      return 0;
    }
    if (c < d) {
      if ((c + 1 >= f && c + 1 <= g) || (c >= f && c <= g)) {
        printf("X");
      } else {
        printf("R");
        c++;
      }
    } else {
      if ((c - 1 >= f && c - 1 <= g) || (c >= f && c <= g)) {
        printf("X");
      } else {
        printf("L");
        c--;
      }
    }
    x++;
  }
}
