import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;

public class popo {

    public static void main(String[] args) {

        InputReader in=new InputReader(System.in);
        PrintWriter out=new PrintWriter(System.out);

        int n=in.nextInt();
        int m=in.nextInt();
        int s=in.nextInt();
        int f=in.nextInt();
        int count=0;
        if(f>s)
        {
            while (m > 0) {
                m--;
                int t = in.nextInt();
                int l = in.nextInt();
                int r = in.nextInt();
                for (int i = 0; ; i++) {
                    if(count==t-1) {

                        if ((s >= l && s <= r) || (s + 1 == l)) {
                            out.print('X');
                        } else {
                            out.print('R');
                            s++;
                            //out.println(s);
                            if (s == f) {
                                //out.print(s);
                                break;
                            }
                        }
                        count++;
                        break;
                    }else{
                        out.print("R");
                        s++;
                        if (s == f) {
                            //out.print(s);
                            break;
                        }
                    }
                    count++;
                }
                if(s==f)
                {
                    break;
                }
            }
        }
            if (f < s) {
                while (m > 0) {
                    m--;
                    int t = in.nextInt();
                    int l = in.nextInt();
                    int r = in.nextInt();
                    for (int i = 0; ; i++) {
                        if(count==t-1) {
                            if ((s >= l && s <= r) || (s - 1 == r)) {
                                out.print('X');
                            } else {
                                out.print('L');
                                s--;
                                if (s == f) {
                                    break;
                                }
                            }
                            count++;
                            break;
                        }else
                        {
                            out.print("L");
                            s--;
                           // out.println(s);
                            if (s == f) {
                                //out.print(s);
                                break;
                            }
                        }
                        count++;

                       // System.out.println(count);
                    }
                    if (s == f) {
                        break;
                    }
                }

            }

        out.close();

    }
    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;

public class popo {

    public static void main(String[] args) {

        InputReader in=new InputReader(System.in);
        PrintWriter out=new PrintWriter(System.out);

        int n=in.nextInt();
        int m=in.nextInt();
        int s=in.nextInt();
        int f=in.nextInt();
        int count=0;
        if(f>s)
        {
            while (1==1) {
                int t = in.nextInt();
                int l = in.nextInt();
                int r = in.nextInt();
                for (int i = 0; ; i++) {
                    if((s>=l && s<=r) || s+1==l)
                    {
                        out.print('X');
                    }else
                    {
                        out.print('R');
                        s++;
                        //out.println(s);
                        if(s==f)
                        {
                            //out.print(s);
                            break;
                        }
                    }
                    count++;
                    if(count>=t)
                    {
                        break;
                    }
                }
                if(s==f)
                {
                    break;
                }
            }

        }
            if (f < s) {
                while (1 == 1) {
                    int t = in.nextInt();
                    int l = in.nextInt();
                    int r = in.nextInt();
                    for (int i = 0; ; i++) {
                        if ((s >= l && s <= r) || s - 1 == r) {
                            out.print('X');
                        } else {
                            out.print('L');
                            s--;
                            if (s == f) {
                                break;
                            }
                        }
                        count++;
                        if (count >= t) {
                            break;
                        }
                    }
                    if (s == f) {
                        break;
                    }
                }

            }

        out.close();

    }
    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    public static class stock{
        int day;
        int price;
        public stock(int day, int price) {
            this.day = day;
            this.price = price;
        }
    }

    public static void sort(stock[] data, int length){
        for(int i=(length/2)-1; i>=0; i--){
            heapify(data,length,i);
        }
        for(int i=length-1; i>=0; i--){
            stock temp = data[0];
            data[0] = data[i];
            data[i] = temp;
            heapify(data,i,0);
        }
    }
    public static void heapify(stock[] data, int length, int pos){
        int largest = pos;
        int left = pos*2+1;
        int right = pos*2+2;
        if(right<length && data[right].price <= data[largest].price){
            if(data[right].price == data[largest].price){
                if(data[right].day >= data[largest].day){
                    largest = right;
                }
            }
            else{
                largest = right;
            }
        }
        if(left<length && data[left].price < data[largest].price){
            if(data[left].price == data[largest].price){
                if(data[left].day >= data[largest].day){
                    largest = left;
                }
            }
            else{
                largest = left;
            }
        }
        if(largest != pos){
            stock temp = data[largest];
            data[largest] = data[pos];
            data[pos] = temp;
            heapify(data,length,largest);
        }
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;

public class popo {

    public static void main(String[] args) {

        InputReader in=new InputReader(System.in);
        PrintWriter out=new PrintWriter(System.out);

        int n=in.nextInt();
        int m=in.nextInt();
        int s=in.nextInt();
        int f=in.nextInt();
        int count=0;
        if(f>s)
        {
            while (m > 0) {
                m--;
                int t = in.nextInt();
                int l = in.nextInt();
                int r = in.nextInt();
                for (int i = 0; ; i++) {
                    if(count==t-1) {

                        if ((s >= l && s <= r) || (s + 1 == l)) {
                            out.print('X');
                        } else {
                            out.print('R');
                            s++;
                            //out.println(s);
                            if (s == f) {
                                //out.print(s);
                                break;
                            }
                        }
                        count++;
                        break;
                    }else{
                        out.print('R');
                        s++;
                        if (s == f) {
                            //out.print(s);
                            break;
                        }
                    }
                    count++;
                }
                if(s==f)
                {
                    break;
                }
            }
            if(m==0 && s!=f){
                while(s!=f){
                    s++;
                    out.print('R');
                }

            }
        }
        else {
            while (m > 0) {
                m--;
                int t = in.nextInt();
                int l = in.nextInt();
                int r = in.nextInt();
                for (int i = 0; ; i++) {
                    if(count==t-1) {
                        if ((s >= l && s <= r) || (s - 1 == r)) {
                            out.print('X');
                        } else {
                            out.print('L');
                            s--;
                            if (s == f) {
                                break;
                            }
                        }
                        count++;
                        break;
                    }else
                    {
                        out.print("L");
                        s--;
                       // out.println(s);
                        if (s == f) {
                            //out.print(s);
                            break;
                        }
                    }
                    count++;

                   // System.out.println(count);
                }
                if (s == f) {
                    break;
                }
            }
            if(m==0 && s!=f){
                while(s!=f){
                    s--;
                    out.print('L');
                }

            }
        }

        out.close();
    }

    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;

public class popo {

    public static void main(String[] args) {

        InputReader in=new InputReader(System.in);
        PrintWriter out=new PrintWriter(System.out);

        int n=in.nextInt();
        int m=in.nextInt();
        int s=in.nextInt();
        int f=in.nextInt();
        int count=0;
        if(f>s)
        {
            while (m > 0) {
                m--;
                int t = in.nextInt();
                int l = in.nextInt();
                int r = in.nextInt();
                for (int i = 0; ; i++) {
                    if((s>=l && s<=r) || (s+1==l))
                        {
                        out.print('X');
                    }else
                    {
                        out.print('R');
                        s++;
                        //out.println(s);
                        if(s==f)
                        {
                            //out.print(s);
                            break;
                        }
                    }
                    count++;
                    if(count>=t)
                    {
                        break;
                    }
                }
                if(s==f)
                {
                    break;
                }
            }
        }
            if (f < s) {
                while (m > 0) {
                    m--;
                    int t = in.nextInt();
                    int l = in.nextInt();
                    int r = in.nextInt();
                    for (int i = 0; ; i++) {
                        if ((s >= l && s <= r) || (s - 1 == r)) {
                            out.print('X');
                        } else {
                            out.print('L');
                            s--;
                            if (s == f) {
                                break;
                            }
                        }
                        count++;
                        if (count >= t) {
                            break;
                        }
                       // System.out.println(count);
                    }
                    if (s == f) {
                        break;
                    }
                }

            }

        out.close();

    }
    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}


import java.util.*;
import java.io.*;

public class XeniaAndSpies {
    public static InputReader in;
    public static PrintWriter out;

    public static final int MOD = (int) (1e9 + 7);

    public static void main(String[] args) {
	in = new InputReader(System.in);
	out = new PrintWriter(System.out);

	int n = in.nextInt(), m = in.nextInt(), s = in.nextInt(), f = in.nextInt();

	int MAX = 100005;
	HashMap<Integer, Integer> start = new HashMap<Integer, Integer>();
	HashMap<Integer, Integer> end = new HashMap<Integer, Integer>();
	for (int i = 0; i < m; i++) {
	    int ti = in.nextInt();
	    start.put(ti, in.nextInt());
	    end.put(ti, in.nextInt());
	}

	int curr = s;
	if(s < f) {
	    for (int i = 1; i < 2*MAX && curr != f; i++) {
		if(!start.containsKey(i) || (isFree(curr, start.get(i), end.get(i)) && isFree(curr + 1, start.get(i), end.get(i)))) {
		    curr++;
		    out.print("R");
		} else {
		    out.print("X");
		}
	    }
	} else {
	    for (int i = 1; i < 2*MAX && curr != f; i++) {
		if(!start.containsKey(i) || (isFree(curr, start.get(i), end.get(i)) && isFree(curr - 1, start.get(i), end.get(i)))) {
		    curr--;
		    out.print("L");
		} else {
		    out.print("X");
		}
	    }
	}

	out.close();
    }

    public static boolean isFree(int curr, int left, int right) {
	return left == 0 || right == 0 || curr < left || curr > right;
    }

    static class Node implements Comparable<Node> {
	int next;
	int dist;

	public Node(int u, int v) {
	    this.next = u;
	    this.dist = v;
	}

	public void print() {
	    out.println(next + " " + dist + " ");
	}

	public int compareTo(Node that) {
	    return Integer.compare(this.next, that.next);
	}
    }

    static class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[8192];
	private int curChar, snumChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
	    this.stream = stream;
	}

	public int snext() {
	    if (snumChars == -1)
		throw new InputMismatchException();
	    if (curChar >= snumChars) {
		curChar = 0;
		try {
		    snumChars = stream.read(buf);
		} catch (IOException e) {
		    throw new InputMismatchException();
		}
		if (snumChars <= 0)
		    return -1;
	    }
	    return buf[curChar++];
	}

	public int nextInt() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    int res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public long nextLong() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    long res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public int[] nextIntArray(int n) {
	    int a[] = new int[n];
	    for (int i = 0; i < n; i++)
		a[i] = nextInt();
	    return a;
	}

	public String readString() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    StringBuilder res = new StringBuilder();
	    do {
		res.appendCodePoint(c);
		c = snext();
	    } while (!isSpaceChar(c));
	    return res.toString();
	}

	public boolean isSpaceChar(int c) {
	    if (filter != null)
		return filter.isSpaceChar(c);
	    return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
	    public boolean isSpaceChar(int ch);
	}
    }
}


import java.util.*;
import java.io.*;

public class XeniaAndSpies {
    public static InputReader in;
    public static PrintWriter out;

    public static final int MOD = (int) (1e9 + 7);

    public static void main(String[] args) {
	in = new InputReader(System.in);
	out = new PrintWriter(System.out);

	int n = in.nextInt(), m = in.nextInt(), s = in.nextInt(), f = in.nextInt();

	int MAX = 100005;
	int[] start = new int[2*MAX],
		end = new int[2*MAX];
	for (int i = 0; i < m; i++) {
	    int ti = in.nextInt();
	    start[ti] = in.nextInt();
	    end[ti] = in.nextInt();
	}

	int curr = s;
	if(s < f) {
	    for (int i = 1; i < 2*MAX && curr != f; i++) {
		if(isFree(curr, start[i], end[i]) && isFree(curr + 1, start[i], end[i])) {
		    curr++;
		    out.print("R");
		} else {
		    out.print("X");
		}
	    }
	} else {
	    for (int i = 1; i < 2*MAX && curr != f; i++) {
		if(isFree(curr, start[i], end[i]) && isFree(curr - 1, start[i], end[i])) {
		    curr--;
		    out.print("L");
		} else {
		    out.print("X");
		}
	    }
	}

	out.close();
    }

    public static boolean isFree(int curr, int left, int right) {
	return left == 0 || right == 0 || curr < left || curr > right;
    }

    static class Node implements Comparable<Node> {
	int next;
	int dist;

	public Node(int u, int v) {
	    this.next = u;
	    this.dist = v;
	}

	public void print() {
	    out.println(next + " " + dist + " ");
	}

	public int compareTo(Node that) {
	    return Integer.compare(this.next, that.next);
	}
    }

    static class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[8192];
	private int curChar, snumChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
	    this.stream = stream;
	}

	public int snext() {
	    if (snumChars == -1)
		throw new InputMismatchException();
	    if (curChar >= snumChars) {
		curChar = 0;
		try {
		    snumChars = stream.read(buf);
		} catch (IOException e) {
		    throw new InputMismatchException();
		}
		if (snumChars <= 0)
		    return -1;
	    }
	    return buf[curChar++];
	}

	public int nextInt() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    int res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public long nextLong() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    long res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public int[] nextIntArray(int n) {
	    int a[] = new int[n];
	    for (int i = 0; i < n; i++)
		a[i] = nextInt();
	    return a;
	}

	public String readString() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    StringBuilder res = new StringBuilder();
	    do {
		res.appendCodePoint(c);
		c = snext();
	    } while (!isSpaceChar(c));
	    return res.toString();
	}

	public boolean isSpaceChar(int c) {
	    if (filter != null)
		return filter.isSpaceChar(c);
	    return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
	    public boolean isSpaceChar(int ch);
	}
    }
}


import java.util.*;
import java.io.*;

public class XeniaAndSpies {
    public static InputReader in;
    public static PrintWriter out;

    public static final int MOD = (int) (1e9 + 7);

    public static void main(String[] args) {
	in = new InputReader(System.in);
	out = new PrintWriter(System.out);

	int n = in.nextInt(), m = in.nextInt(), s = in.nextInt(), f = in.nextInt();

	int MAX = 100005;
	int[] start = new int[5*MAX],
		end = new int[5*MAX];
	for (int i = 0; i < m; i++) {
	    int ti = in.nextInt();
	    start[ti] = in.nextInt();
	    end[ti] = in.nextInt();
	}

	int curr = s;
	if(s < f) {
	    for (int i = 1; i < 5*MAX && curr != f; i++) {
		if(isFree(curr, start[i], end[i]) && isFree(curr + 1, start[i], end[i])) {
		    curr++;
		    out.print("R");
		} else {
		    out.print("X");
		}
	    }
	} else {
	    for (int i = 1; i < 5*MAX && curr != f; i++) {
		if(isFree(curr, start[i], end[i]) && isFree(curr - 1, start[i], end[i])) {
		    curr--;
		    out.print("L");
		} else {
		    out.print("X");
		}
	    }
	}

	out.close();
    }

    public static boolean isFree(int curr, int left, int right) {
	return left == 0 || right == 0 || curr < left || curr > right;
    }

    static class Node implements Comparable<Node> {
	int next;
	int dist;

	public Node(int u, int v) {
	    this.next = u;
	    this.dist = v;
	}

	public void print() {
	    out.println(next + " " + dist + " ");
	}

	public int compareTo(Node that) {
	    return Integer.compare(this.next, that.next);
	}
    }

    static class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[8192];
	private int curChar, snumChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
	    this.stream = stream;
	}

	public int snext() {
	    if (snumChars == -1)
		throw new InputMismatchException();
	    if (curChar >= snumChars) {
		curChar = 0;
		try {
		    snumChars = stream.read(buf);
		} catch (IOException e) {
		    throw new InputMismatchException();
		}
		if (snumChars <= 0)
		    return -1;
	    }
	    return buf[curChar++];
	}

	public int nextInt() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    int res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public long nextLong() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    long res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public int[] nextIntArray(int n) {
	    int a[] = new int[n];
	    for (int i = 0; i < n; i++)
		a[i] = nextInt();
	    return a;
	}

	public String readString() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    StringBuilder res = new StringBuilder();
	    do {
		res.appendCodePoint(c);
		c = snext();
	    } while (!isSpaceChar(c));
	    return res.toString();
	}

	public boolean isSpaceChar(int c) {
	    if (filter != null)
		return filter.isSpaceChar(c);
	    return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
	    public boolean isSpaceChar(int ch);
	}
    }
}


import javax.print.DocFlavor;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.io.*;
import java.math.BigInteger;
import java.nio.Buffer;
import java.sql.BatchUpdateException;
import java.util.*;
import java.util.stream.Stream;
import java.util.Vector;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import static java.lang.Math.*;
import java.util.*;
import java.nio.file.StandardOpenOption;
public class icpc
{
    public static void main(String[] args)throws IOException
    {
    //    Reader in = new Reader();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String s2[] = in.readLine().split(" ");
        int n = Integer.parseInt(s2[0]);
        int m = Integer.parseInt(s2[1]);
        int s = Integer.parseInt(s2[2]);
        int f = Integer.parseInt(s2[3]);
        StringBuilder stringBuilder = new StringBuilder();
        long current = 0L;
        for(int i=1;i<=m;i++)
        {
            String s1[] = in.readLine().split(" ");
            long t = Long.parseLong(s1[0]);
            long l = Long.parseLong(s1[1]);
            long r = Long.parseLong(s1[2]);
            long diff = t - current - 1;
            if(diff > 0 && s != f)
            {
                if(s < f)
                {
                    int temp = s;
                    for(int j=s;j<Math.min(temp+diff,f);j++)
                    {
                        stringBuilder.append("R");
                        s++;
                    }
                }
                else
                {
                    int temp = s;
                    for(int j=s;j>Math.max(temp-diff,f);j--)
                    {
                        stringBuilder.append("L");
                        s--;
                    }
                }
            }
            if(s == f)
                break;
            else if(s < f && (r < s || l > (s + 1)))
            {
                s++;
                stringBuilder.append("R");
            }
            else if(s > f && (l > s || r < (s - 1)))
            {
                s--;
                stringBuilder.append("L");
            }
            else
            {
                stringBuilder.append("X");
            }
            current = t;
        }
        System.out.println(stringBuilder);
    }
}
class Solver
{
    public void solve(long[] A,Game[] B)
    {
    }
}
class Point implements Comparable<Point>
{
    int x;
    int y;
    Point(int a ,int b)
    {
        this.x = a;
        this.y = b;
    }
    public int compareTo(Point ob)
    {
        if(ob.x < this.x)
            return 1;
        else if(ob.x > this.x)
            return -1;
        else
            return 0;
    }
}
class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
}
class Node
{
    int[] A;
    int moves;
    Node(int[] B,int c)
    {
        this.A = new int[B.length];
        A = B.clone();
        this.moves = c;
    }
    @Override
    public boolean equals(Object ob)
    {
        if(ob == null)
            return false;
        if(!(ob instanceof Node))
            return false;
        if(ob == this)
            return true;
        Node obj = (Node)ob;
        boolean flag = true;
        for(int i=0;i<obj.A.length;i++)
        {
            if(this.A[i] != obj.A[i])
                flag = false;
        }
        return (flag & (obj.moves == this.moves));
    }
    @Override
    public int hashCode()
    {
        return (int)this.A.length;
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}
class Game
{
    int last;
    int diff;
    boolean flag;
    Game(int a,int b,boolean z)
    {
        this.last = a;
        this.diff = b;
        this.flag = z;
    }
}
class Play
{
    int ta;
    int tb;
    int len;
    Play(int a,int b,int c)
    {
        this.ta = a;
        this.tb = b;
        this.len = c;
    }
}
class SegmentTree
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public Play[] createSegmentTree(char[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        Play[] segmentTree = new Play[np2* 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = new Play(0,0,0);

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;
    }
    public void constructSegmentTree(Play[] segmentTree,char[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = new Play((input[low] == '(')?1:0,(input[low] == ')')?1:0,0);
            return;
        }
        int mid = (low + high)/2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid + 1,high,2*pos + 2);
        int t = Math.min(segmentTree[2*pos + 1].ta, segmentTree[2*pos + 2].tb);
        int len = segmentTree[2*pos + 1].len + segmentTree[2*pos + 2].len + 2*t;
        int ta = segmentTree[2*pos + 1].ta + segmentTree[2*pos + 2].ta - t;
        int tb = segmentTree[2*pos + 1].tb + segmentTree[2*pos + 2].tb - t;
        segmentTree[pos] = new Play(ta,tb,len);
    }
    public Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,qlow,qhigh,0,len - 1,0);
    }
    private Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int low,int high,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        if(qlow > high || qhigh < low)
        {
            return new Play(0,0,0);
        }
        int mid = (low + high)/2;
        Play a = rangeMinimumQuery(segmentTree,qlow,qhigh,low,mid,2*pos + 1);
        Play b = rangeMinimumQuery(segmentTree,qlow,qhigh,mid + 1,high,2*pos + 2);
        int t = Math.min(a.ta, b.tb);
        int len = a.len + b.len + 2*t;
        int ta = a.ta + b.ta - t;
        int tb = a.tb + b.tb - t;
        return new Play(ta,tb,len);
    }
}
class SegmentTree1
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public int[] createSegmentTree(int[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        int[] segmentTree = new int[np2 * 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = Integer.MAX_VALUE;

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;

    }
    private void constructSegmentTree(int[] segmentTree,int[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = input[low];
            return;
        }
        int mid = (low + high)/ 2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid+1,high,2*pos + 2);
        segmentTree[pos] = Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQuery(int[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,0,len - 1,qlow,qhigh,0);
    }
    private int rangeMinimumQuery(int[] segmentTree,int low,int high,int qlow,int qhigh,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        else if(qlow > high || qhigh < low)
        {
            return Integer.MAX_VALUE;
        }
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQuery(segmentTree,low,mid,qlow,qhigh,2*pos+1),rangeMinimumQuery(segmentTree,mid+1,high,qlow,qhigh,2*pos+2));
    }
    public void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta)
    {
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,0,input.length-1,0);
    }
    private void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta,int low,int high,int pos)
    {
        if(low > high)
        {
            return;
        }
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos+1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(startRange > high || endRange < low)
            return;
        if(startRange <= low && endRange >= high)
        {
            segmentTree[pos] += delta;
            if(low != high)
            {
                lazy[2*pos + 1] += delta;
                lazy[2*pos + 2] += delta;
            }
            return;
        }
        int mid = (low + high)/2;
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,low,mid,2*pos + 1);
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,mid + 1,high,2 * pos + 2);
        segmentTree[pos] += Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int len)
    {
        return rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,0,len - 1,0);
    }
    private int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int low,int high,int pos)
    {
        if(low > high)
            return Integer.MAX_VALUE;
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos + 1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(qlow > high || qhigh < low)
            return Integer.MAX_VALUE;
        if(qlow <= low && qhigh >= low)
            return segmentTree[pos];
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,low,mid,2*pos + 1),rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,mid + 1,high,2*pos + 2));
    }
}
class FenwickTree
{
    public void update(int[] fenwickTree,int delta,int index)
    {
        index += 1;
        while(index < fenwickTree.length)
        {
            fenwickTree[index] += delta;
            index = index + (index & (-index));
        }
    }
    public int prefixSum(int[] fenwickTree,int index)
    {
        int sum = 0;
        index += 1;
        while(index > 0)
        {
            sum += fenwickTree[index];
            index -= (index & (-index));
        }
        return sum;
    }
}


import javax.print.DocFlavor;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.io.*;
import java.math.BigInteger;
import java.nio.Buffer;
import java.sql.BatchUpdateException;
import java.util.*;
import java.util.stream.Stream;
import java.util.Vector;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import static java.lang.Math.*;
import java.util.*;
import java.nio.file.StandardOpenOption;
public class icpc
{
    public static void main(String[] args)throws IOException
    {
    //    Reader in = new Reader();
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String s2[] = in.readLine().split(" ");
        int n = Integer.parseInt(s2[0]);
        int m = Integer.parseInt(s2[1]);
        int s = Integer.parseInt(s2[2]);
        int f = Integer.parseInt(s2[3]);
        StringBuilder stringBuilder = new StringBuilder();
        long current = 0L;
        for(int i=1;i<=m;i++)
        {
            String s1[] = in.readLine().split(" ");
            long t = Long.parseLong(s1[0]);
            long l = Long.parseLong(s1[1]);
            long r = Long.parseLong(s1[2]);
            long diff = t - current - 1;
            if(diff > 0 && s != f)
            {
                if(s < f)
                {
                    int temp = s;
                    for(int j=s;j<Math.min(temp+diff,f);j++)
                    {
                        stringBuilder.append("R");
                        s++;
                    }
                }
                else
                {
                    int temp = s;
                    for(int j=s;j>Math.max(temp-diff,f);j--)
                    {
                        stringBuilder.append("L");
                        s--;
                    }
                }
            }
            if(s == f)
                break;
            else if(s < f && (r < s || l > (s + 1)))
            {
                s++;
                stringBuilder.append("R");
            }
            else if(s > f && (l > s || r < (s - 1)))
            {
                s--;
                stringBuilder.append("L");
            }
            else
            {
                stringBuilder.append("X");
            }
            current = t;
        }
        if(s != f)
        {
            if(s < f)
            {
                for(int i=s;i<f;i++)
                    stringBuilder.append("R");
            }
            else
            {
                for(int i=s;i>f;i--)
                    stringBuilder.append("L");
            }
        }
        System.out.println(stringBuilder);
    }
}
class Solver
{
    public void solve(long[] A,Game[] B)
    {
    }
}
class Point implements Comparable<Point>
{
    int x;
    int y;
    Point(int a ,int b)
    {
        this.x = a;
        this.y = b;
    }
    public int compareTo(Point ob)
    {
        if(ob.x < this.x)
            return 1;
        else if(ob.x > this.x)
            return -1;
        else
            return 0;
    }
}
class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
}
class Node
{
    int[] A;
    int moves;
    Node(int[] B,int c)
    {
        this.A = new int[B.length];
        A = B.clone();
        this.moves = c;
    }
    @Override
    public boolean equals(Object ob)
    {
        if(ob == null)
            return false;
        if(!(ob instanceof Node))
            return false;
        if(ob == this)
            return true;
        Node obj = (Node)ob;
        boolean flag = true;
        for(int i=0;i<obj.A.length;i++)
        {
            if(this.A[i] != obj.A[i])
                flag = false;
        }
        return (flag & (obj.moves == this.moves));
    }
    @Override
    public int hashCode()
    {
        return (int)this.A.length;
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}
class Game
{
    int last;
    int diff;
    boolean flag;
    Game(int a,int b,boolean z)
    {
        this.last = a;
        this.diff = b;
        this.flag = z;
    }
}
class Play
{
    int ta;
    int tb;
    int len;
    Play(int a,int b,int c)
    {
        this.ta = a;
        this.tb = b;
        this.len = c;
    }
}
class SegmentTree
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public Play[] createSegmentTree(char[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        Play[] segmentTree = new Play[np2* 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = new Play(0,0,0);

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;
    }
    public void constructSegmentTree(Play[] segmentTree,char[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = new Play((input[low] == '(')?1:0,(input[low] == ')')?1:0,0);
            return;
        }
        int mid = (low + high)/2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid + 1,high,2*pos + 2);
        int t = Math.min(segmentTree[2*pos + 1].ta, segmentTree[2*pos + 2].tb);
        int len = segmentTree[2*pos + 1].len + segmentTree[2*pos + 2].len + 2*t;
        int ta = segmentTree[2*pos + 1].ta + segmentTree[2*pos + 2].ta - t;
        int tb = segmentTree[2*pos + 1].tb + segmentTree[2*pos + 2].tb - t;
        segmentTree[pos] = new Play(ta,tb,len);
    }
    public Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,qlow,qhigh,0,len - 1,0);
    }
    private Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int low,int high,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        if(qlow > high || qhigh < low)
        {
            return new Play(0,0,0);
        }
        int mid = (low + high)/2;
        Play a = rangeMinimumQuery(segmentTree,qlow,qhigh,low,mid,2*pos + 1);
        Play b = rangeMinimumQuery(segmentTree,qlow,qhigh,mid + 1,high,2*pos + 2);
        int t = Math.min(a.ta, b.tb);
        int len = a.len + b.len + 2*t;
        int ta = a.ta + b.ta - t;
        int tb = a.tb + b.tb - t;
        return new Play(ta,tb,len);
    }
}
class SegmentTree1
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public int[] createSegmentTree(int[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        int[] segmentTree = new int[np2 * 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = Integer.MAX_VALUE;

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;

    }
    private void constructSegmentTree(int[] segmentTree,int[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = input[low];
            return;
        }
        int mid = (low + high)/ 2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid+1,high,2*pos + 2);
        segmentTree[pos] = Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQuery(int[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,0,len - 1,qlow,qhigh,0);
    }
    private int rangeMinimumQuery(int[] segmentTree,int low,int high,int qlow,int qhigh,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        else if(qlow > high || qhigh < low)
        {
            return Integer.MAX_VALUE;
        }
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQuery(segmentTree,low,mid,qlow,qhigh,2*pos+1),rangeMinimumQuery(segmentTree,mid+1,high,qlow,qhigh,2*pos+2));
    }
    public void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta)
    {
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,0,input.length-1,0);
    }
    private void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta,int low,int high,int pos)
    {
        if(low > high)
        {
            return;
        }
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos+1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(startRange > high || endRange < low)
            return;
        if(startRange <= low && endRange >= high)
        {
            segmentTree[pos] += delta;
            if(low != high)
            {
                lazy[2*pos + 1] += delta;
                lazy[2*pos + 2] += delta;
            }
            return;
        }
        int mid = (low + high)/2;
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,low,mid,2*pos + 1);
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,mid + 1,high,2 * pos + 2);
        segmentTree[pos] += Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int len)
    {
        return rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,0,len - 1,0);
    }
    private int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int low,int high,int pos)
    {
        if(low > high)
            return Integer.MAX_VALUE;
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos + 1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(qlow > high || qhigh < low)
            return Integer.MAX_VALUE;
        if(qlow <= low && qhigh >= low)
            return segmentTree[pos];
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,low,mid,2*pos + 1),rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,mid + 1,high,2*pos + 2));
    }
}
class FenwickTree
{
    public void update(int[] fenwickTree,int delta,int index)
    {
        index += 1;
        while(index < fenwickTree.length)
        {
            fenwickTree[index] += delta;
            index = index + (index & (-index));
        }
    }
    public int prefixSum(int[] fenwickTree,int index)
    {
        int sum = 0;
        index += 1;
        while(index > 0)
        {
            sum += fenwickTree[index];
            index -= (index & (-index));
        }
        return sum;
    }
}


import javax.print.DocFlavor;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.io.*;
import java.math.BigInteger;
import java.nio.Buffer;
import java.sql.BatchUpdateException;
import java.util.*;
import java.util.stream.Stream;
import java.util.Vector;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import static java.lang.Math.*;
import java.util.*;
import java.nio.file.StandardOpenOption;
public class icpc
{
    public static void main(String[] args)throws IOException
    {
        Reader in = new Reader();
    //    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        int n = in.nextInt();
        int m = in.nextInt();
        int s = in.nextInt();
        int f = in.nextInt();
        StringBuilder stringBuilder = new StringBuilder();
        long current = 0L;
        for(int i=0;i<m;i++)
        {
            long t = in.nextLong();
            long l = in.nextLong();
            long r = in.nextLong();
            long diff = t - current - 1;
            if(diff > 0 && s != f)
            {
                if(s < f)
                {
                    int temp = s;
                    for(int j=0;j<Math.min(temp+diff,f);j++)
                    {
                        stringBuilder.append("R");
                        s++;
                    }
                }
                else
                {
                    int temp = s;
                    for(int j=0;j<Math.max(temp-diff,f);j++)
                    {
                        stringBuilder.append("L");
                        s--;
                    }
                }
            }
            if(s == f)
                break;
            else if(s < f && (r < s || l > (s + 1)))
            {
                s++;
                stringBuilder.append("R");
            }
            else if(s > f && (l > s || r < (s - 1)))
            {
                s--;
                stringBuilder.append("L");
            }
            else
            {
                stringBuilder.append("X");
            }
            current = t;
        }
        System.out.println(stringBuilder);
    }
}
class Solver
{
    public void solve(long[] A,Game[] B)
    {
    }
}
class Point implements Comparable<Point>
{
    int x;
    int y;
    Point(int a ,int b)
    {
        this.x = a;
        this.y = b;
    }
    public int compareTo(Point ob)
    {
        if(ob.x < this.x)
            return 1;
        else if(ob.x > this.x)
            return -1;
        else
            return 0;
    }
}
class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
}
class Node
{
    int[] A;
    int moves;
    Node(int[] B,int c)
    {
        this.A = new int[B.length];
        A = B.clone();
        this.moves = c;
    }
    @Override
    public boolean equals(Object ob)
    {
        if(ob == null)
            return false;
        if(!(ob instanceof Node))
            return false;
        if(ob == this)
            return true;
        Node obj = (Node)ob;
        boolean flag = true;
        for(int i=0;i<obj.A.length;i++)
        {
            if(this.A[i] != obj.A[i])
                flag = false;
        }
        return (flag & (obj.moves == this.moves));
    }
    @Override
    public int hashCode()
    {
        return (int)this.A.length;
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}
class Game
{
    int last;
    int diff;
    boolean flag;
    Game(int a,int b,boolean z)
    {
        this.last = a;
        this.diff = b;
        this.flag = z;
    }
}
class Play
{
    int ta;
    int tb;
    int len;
    Play(int a,int b,int c)
    {
        this.ta = a;
        this.tb = b;
        this.len = c;
    }
}
class SegmentTree
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public Play[] createSegmentTree(char[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        Play[] segmentTree = new Play[np2* 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = new Play(0,0,0);

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;
    }
    public void constructSegmentTree(Play[] segmentTree,char[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = new Play((input[low] == '(')?1:0,(input[low] == ')')?1:0,0);
            return;
        }
        int mid = (low + high)/2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid + 1,high,2*pos + 2);
        int t = Math.min(segmentTree[2*pos + 1].ta, segmentTree[2*pos + 2].tb);
        int len = segmentTree[2*pos + 1].len + segmentTree[2*pos + 2].len + 2*t;
        int ta = segmentTree[2*pos + 1].ta + segmentTree[2*pos + 2].ta - t;
        int tb = segmentTree[2*pos + 1].tb + segmentTree[2*pos + 2].tb - t;
        segmentTree[pos] = new Play(ta,tb,len);
    }
    public Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,qlow,qhigh,0,len - 1,0);
    }
    private Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int low,int high,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        if(qlow > high || qhigh < low)
        {
            return new Play(0,0,0);
        }
        int mid = (low + high)/2;
        Play a = rangeMinimumQuery(segmentTree,qlow,qhigh,low,mid,2*pos + 1);
        Play b = rangeMinimumQuery(segmentTree,qlow,qhigh,mid + 1,high,2*pos + 2);
        int t = Math.min(a.ta, b.tb);
        int len = a.len + b.len + 2*t;
        int ta = a.ta + b.ta - t;
        int tb = a.tb + b.tb - t;
        return new Play(ta,tb,len);
    }
}
class SegmentTree1
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public int[] createSegmentTree(int[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        int[] segmentTree = new int[np2 * 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = Integer.MAX_VALUE;

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;

    }
    private void constructSegmentTree(int[] segmentTree,int[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = input[low];
            return;
        }
        int mid = (low + high)/ 2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid+1,high,2*pos + 2);
        segmentTree[pos] = Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQuery(int[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,0,len - 1,qlow,qhigh,0);
    }
    private int rangeMinimumQuery(int[] segmentTree,int low,int high,int qlow,int qhigh,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        else if(qlow > high || qhigh < low)
        {
            return Integer.MAX_VALUE;
        }
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQuery(segmentTree,low,mid,qlow,qhigh,2*pos+1),rangeMinimumQuery(segmentTree,mid+1,high,qlow,qhigh,2*pos+2));
    }
    public void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta)
    {
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,0,input.length-1,0);
    }
    private void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta,int low,int high,int pos)
    {
        if(low > high)
        {
            return;
        }
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos+1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(startRange > high || endRange < low)
            return;
        if(startRange <= low && endRange >= high)
        {
            segmentTree[pos] += delta;
            if(low != high)
            {
                lazy[2*pos + 1] += delta;
                lazy[2*pos + 2] += delta;
            }
            return;
        }
        int mid = (low + high)/2;
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,low,mid,2*pos + 1);
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,mid + 1,high,2 * pos + 2);
        segmentTree[pos] += Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int len)
    {
        return rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,0,len - 1,0);
    }
    private int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int low,int high,int pos)
    {
        if(low > high)
            return Integer.MAX_VALUE;
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos + 1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(qlow > high || qhigh < low)
            return Integer.MAX_VALUE;
        if(qlow <= low && qhigh >= low)
            return segmentTree[pos];
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,low,mid,2*pos + 1),rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,mid + 1,high,2*pos + 2));
    }
}
class FenwickTree
{
    public void update(int[] fenwickTree,int delta,int index)
    {
        index += 1;
        while(index < fenwickTree.length)
        {
            fenwickTree[index] += delta;
            index = index + (index & (-index));
        }
    }
    public int prefixSum(int[] fenwickTree,int index)
    {
        int sum = 0;
        index += 1;
        while(index > 0)
        {
            sum += fenwickTree[index];
            index -= (index & (-index));
        }
        return sum;
    }
}


import javax.print.DocFlavor;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.io.*;
import java.math.BigInteger;
import java.nio.Buffer;
import java.sql.BatchUpdateException;
import java.util.*;
import java.util.stream.Stream;
import java.util.Vector;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import static java.lang.Math.*;
import java.util.*;
import java.nio.file.StandardOpenOption;
public class icpc
{
    public static void main(String[] args)throws IOException
    {
        Reader in = new Reader();
    //    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        int n = in.nextInt();
        int m = in.nextInt();
        int s = in.nextInt();
        int f = in.nextInt();
        StringBuilder stringBuilder = new StringBuilder();
        long current = 0L;
        for(int i=0;i<m;i++)
        {
            long t = in.nextLong();
            long l = in.nextLong();
            long r = in.nextLong();
            long diff = t - current - 1;
            if(diff > 0 && s != f)
            {
                if(s < f)
                {
                    int temp = s;
                    for(int j=s;j<Math.min(temp+diff,f);j++)
                    {
                        stringBuilder.append("R");
                        s++;
                    }
                }
                else
                {
                    int temp = s;
                    for(int j=s;j<Math.max(temp-diff,f);j++)
                    {
                        stringBuilder.append("L");
                        s--;
                    }
                }
            }
            if(s == f)
                break;
            else if(s < f && (r < s || l > (s + 1)))
            {
                s++;
                stringBuilder.append("R");
            }
            else if(s > f && (l > s || r < (s - 1)))
            {
                s--;
                stringBuilder.append("L");
            }
            else
            {
                stringBuilder.append("X");
            }
            current = t;
        }
        System.out.println(stringBuilder);
    }
}
class Solver
{
    public void solve(long[] A,Game[] B)
    {
    }
}
class Point implements Comparable<Point>
{
    int x;
    int y;
    Point(int a ,int b)
    {
        this.x = a;
        this.y = b;
    }
    public int compareTo(Point ob)
    {
        if(ob.x < this.x)
            return 1;
        else if(ob.x > this.x)
            return -1;
        else
            return 0;
    }
}
class MergeSort
{
    // Merges two subarrays of arr[].
    // First subarray is arr[l..m]
    // Second subarray is arr[m+1..r]
    void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
}
class Node
{
    int[] A;
    int moves;
    Node(int[] B,int c)
    {
        this.A = new int[B.length];
        A = B.clone();
        this.moves = c;
    }
    @Override
    public boolean equals(Object ob)
    {
        if(ob == null)
            return false;
        if(!(ob instanceof Node))
            return false;
        if(ob == this)
            return true;
        Node obj = (Node)ob;
        boolean flag = true;
        for(int i=0;i<obj.A.length;i++)
        {
            if(this.A[i] != obj.A[i])
                flag = false;
        }
        return (flag & (obj.moves == this.moves));
    }
    @Override
    public int hashCode()
    {
        return (int)this.A.length;
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}
class Game
{
    int last;
    int diff;
    boolean flag;
    Game(int a,int b,boolean z)
    {
        this.last = a;
        this.diff = b;
        this.flag = z;
    }
}
class Play
{
    int ta;
    int tb;
    int len;
    Play(int a,int b,int c)
    {
        this.ta = a;
        this.tb = b;
        this.len = c;
    }
}
class SegmentTree
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public Play[] createSegmentTree(char[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        Play[] segmentTree = new Play[np2* 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = new Play(0,0,0);

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;
    }
    public void constructSegmentTree(Play[] segmentTree,char[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = new Play((input[low] == '(')?1:0,(input[low] == ')')?1:0,0);
            return;
        }
        int mid = (low + high)/2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid + 1,high,2*pos + 2);
        int t = Math.min(segmentTree[2*pos + 1].ta, segmentTree[2*pos + 2].tb);
        int len = segmentTree[2*pos + 1].len + segmentTree[2*pos + 2].len + 2*t;
        int ta = segmentTree[2*pos + 1].ta + segmentTree[2*pos + 2].ta - t;
        int tb = segmentTree[2*pos + 1].tb + segmentTree[2*pos + 2].tb - t;
        segmentTree[pos] = new Play(ta,tb,len);
    }
    public Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,qlow,qhigh,0,len - 1,0);
    }
    private Play rangeMinimumQuery(Play[] segmentTree,int qlow,int qhigh,int low,int high,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        if(qlow > high || qhigh < low)
        {
            return new Play(0,0,0);
        }
        int mid = (low + high)/2;
        Play a = rangeMinimumQuery(segmentTree,qlow,qhigh,low,mid,2*pos + 1);
        Play b = rangeMinimumQuery(segmentTree,qlow,qhigh,mid + 1,high,2*pos + 2);
        int t = Math.min(a.ta, b.tb);
        int len = a.len + b.len + 2*t;
        int ta = a.ta + b.ta - t;
        int tb = a.tb + b.tb - t;
        return new Play(ta,tb,len);
    }
}
class SegmentTree1
{
    public int nextPowerOfTwo(int num)
    {
        if(num == 0)
            return 1;
        if(num > 0 && (num & (num - 1)) == 0)
            return num;
        while((num &(num - 1)) > 0)
        {
            num = num & (num - 1);
        }
        return num << 1;
    }
    public int[] createSegmentTree(int[] input)
    {
        int np2 = nextPowerOfTwo(input.length);
        int[] segmentTree = new int[np2 * 2 - 1];

        for(int i=0;i<segmentTree.length;i++)
            segmentTree[i] = Integer.MAX_VALUE;

        constructSegmentTree(segmentTree,input,0,input.length-1,0);
        return segmentTree;

    }
    private void constructSegmentTree(int[] segmentTree,int[] input,int low,int high,int pos)
    {
        if(low == high)
        {
            segmentTree[pos] = input[low];
            return;
        }
        int mid = (low + high)/ 2;
        constructSegmentTree(segmentTree,input,low,mid,2*pos + 1);
        constructSegmentTree(segmentTree,input,mid+1,high,2*pos + 2);
        segmentTree[pos] = Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQuery(int[] segmentTree,int qlow,int qhigh,int len)
    {
        return rangeMinimumQuery(segmentTree,0,len - 1,qlow,qhigh,0);
    }
    private int rangeMinimumQuery(int[] segmentTree,int low,int high,int qlow,int qhigh,int pos)
    {
        if(qlow <= low && qhigh >= high)
        {
            return segmentTree[pos];
        }
        else if(qlow > high || qhigh < low)
        {
            return Integer.MAX_VALUE;
        }
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQuery(segmentTree,low,mid,qlow,qhigh,2*pos+1),rangeMinimumQuery(segmentTree,mid+1,high,qlow,qhigh,2*pos+2));
    }
    public void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta)
    {
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,0,input.length-1,0);
    }
    private void updateSegmentTreeRangeLazy(int[] input,int[] segmentTree,int[] lazy,int startRange,int endRange,int delta,int low,int high,int pos)
    {
        if(low > high)
        {
            return;
        }
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos+1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(startRange > high || endRange < low)
            return;
        if(startRange <= low && endRange >= high)
        {
            segmentTree[pos] += delta;
            if(low != high)
            {
                lazy[2*pos + 1] += delta;
                lazy[2*pos + 2] += delta;
            }
            return;
        }
        int mid = (low + high)/2;
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,low,mid,2*pos + 1);
        updateSegmentTreeRangeLazy(input,segmentTree,lazy,startRange,endRange,delta,mid + 1,high,2 * pos + 2);
        segmentTree[pos] += Math.min(segmentTree[2*pos + 1],segmentTree[2*pos + 2]);
    }
    public int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int len)
    {
        return rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,0,len - 1,0);
    }
    private int rangeMinimumQueryLazy(int[] segmentTree,int[] lazy,int qlow,int qhigh,int low,int high,int pos)
    {
        if(low > high)
            return Integer.MAX_VALUE;
        if(lazy[pos] != 0)
        {
            segmentTree[pos] += lazy[pos];
            if(low != high)
            {
                lazy[2*pos + 1] += lazy[pos];
                lazy[2*pos + 2] += lazy[pos];
            }
            lazy[pos] = 0;
        }
        if(qlow > high || qhigh < low)
            return Integer.MAX_VALUE;
        if(qlow <= low && qhigh >= low)
            return segmentTree[pos];
        int mid = (low + high)/2;
        return Math.min(rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,low,mid,2*pos + 1),rangeMinimumQueryLazy(segmentTree,lazy,qlow,qhigh,mid + 1,high,2*pos + 2));
    }
}
class FenwickTree
{
    public void update(int[] fenwickTree,int delta,int index)
    {
        index += 1;
        while(index < fenwickTree.length)
        {
            fenwickTree[index] += delta;
            index = index + (index & (-index));
        }
    }
    public int prefixSum(int[] fenwickTree,int index)
    {
        int sum = 0;
        index += 1;
        while(index > 0)
        {
            sum += fenwickTree[index];
            index -= (index & (-index));
        }
        return sum;
    }
}


import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class XeniaAndSpies implements Closeable {

    private InputReader in = new InputReader(System.in);
    private PrintWriter out = new PrintWriter(System.out);

    public void solve() {
        int n = in.ni(), m = in.ni(), s = in.ni(), f = in.ni(), step = s > f ? -1 : 1;
        char move = step == 1 ? 'R' : 'L';
        int[] time = new int[m], left = new int[m], right = new int[m];
        for (int i = 0; i < m; i++) {
            int t = in.ni(), l = in.ni(), r = in.ni();
            time[i] = t;
            left[i] = l;
            right[i] = r;
        }
        StringBuilder result = new StringBuilder();
        int idx = 0;
        for (int t = 1; ;t++) {
            if (idx == m) break;
            if (time[idx] == t) {
                if ((s >= left[idx] && s <= right[idx]) ||
                    (s + step >= left[idx] && s + step <= right[idx])) {
                    result.append('X');
                } else {
                    result.append(move);
                    s += step;
                }
                idx++;
            } else {
                s += step;
                result.append(move);
            }
            if (s == f) {
                break;
            }
        }
        while (s != f) {
            result.append(move);
            s += step;
        }
        out.println(result);
    }

    @Override
    public void close() throws IOException {
        in.close();
        out.close();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int ni() {
            return Integer.parseInt(next());
        }

        public long nl() {
            return Long.parseLong(next());
        }

        public void close() throws IOException {
            reader.close();
        }
    }

    public static void main(String[] args) throws IOException {
        try (XeniaAndSpies instance = new XeniaAndSpies()) {
            instance.solve();
        }
    }
}


import java.util.*;
import java.io.*;

public class xs
{
   public static void main (String[] args) throws Exception{
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int m=sc.nextInt();
int s=sc.nextInt();
int f=sc.nextInt();
int t[]=new int[m];
int l[]=new int[m];
int r[]=new int[m];
for(int i=0;i<m;i++){
	t[i]=sc.nextInt();
	l[i]=sc.nextInt();
	r[i]=sc.nextInt();
}
if(s<f){
	int t1=1;
    for(int i=0;i<m;i++){
    	//System.out.println("l: "+l[i]+"i: "+i);
    	if(s+1<l[i] || s>r[i] || t1!=t[i]) {
    		    	//System.out.println("s: "+s);

    		System.out.print("R");
    		s=s+1;
    		if(s==f){
    			break;
    		}
    	}else{
    		System.out.print("X");
    	}
    	t1++;
    }

}else if(s==f){
        System.out.println("X");
}else{
	int t1=1;
      for(int i=0;i<m;i++){
    	if(s-1>r[i] || s<l[i] || t1!=t[i]){
    		System.out.print("L");
    		s=s-1;
    		if(s==f){
    			break;
    		}
    	}else{
    		System.out.print("X");
    	}
    	t1++;
    }
}

}
    }


import java.util.*;
import java.io.*;

public class xs
{
   public static void main (String[] args) throws Exception{
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int m=sc.nextInt();
int s=sc.nextInt();
int f=sc.nextInt();
int t[]=new int[m];
int l[]=new int[m];
int r[]=new int[m];
for(int i=0;i<m;i++){
	t[i]=sc.nextInt();
	l[i]=sc.nextInt();
	r[i]=sc.nextInt();
}
if(s<f){
    for(int i=0;i<m;i++){
    	//System.out.println("l: "+l[i]+"i: "+i);
    	if(s+1<l[i] || s>r[i]){
    		    	//System.out.println("s: "+s);

    		System.out.print("R");
    		s=s+1;
    		if(s==f){
    			break;
    		}
    	}else{
    		System.out.print("X");
    	}
    }

}else if(s==f){
        System.out.println("X");
}else{
      for(int i=0;i<m;i++){
    	if(s-1>r[i] || s<l[i]){
    		System.out.print("L");
    		s=s-1;
    		if(s==f){
    			break;
    		}
    	}else{
    		System.out.print("X");
    	}
    }
}

}
    }