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

public class xs
{
   public static void main (String[] args) throws Exception{
Scanner in = new Scanner(System.in);
        PrintWriter out=new PrintWriter(System.out);
        StringBuilder sb=new StringBuilder();

  int n=in.nextInt(),m=in.nextInt(),s=in.nextInt(),f=in.nextInt(),last=0;
        if(s==f){
            out.println("X");
            out.close();
            return;
        }

        for(int i=1;i<=m&&s!=f;i++){

            int t=in.nextInt();
            int l=in.nextInt();
            int r=in.nextInt();

            while(last+1<t&&s!=f){
                if(s<f){
                    sb.append('R');
                    s++;
                }
                else if(s>f){
                    sb.append('L');
                    s--;
                }
                last++;
            }
            last=t;

            if(s==f)
                break;

            if(s>=l&&s<=r){
                sb.append('X');
                continue;
            }

            if(s<f){
                if(s+1>=l&&s+1<=r)
                    sb.append('X');
                else{
                    sb.append('R');
                    s++;
                }
            }
            else {
                if(s-1>=l&&s-1<=r)
                    sb.append('X');
                else{
                    sb.append('L');
                    s--;
                }
            }
        }
        while(s!=f){
            if(s<f){
                sb.append('R');
                s++;
            }
            else {
                sb.append('L');
                s--;
            }
        }
        out.println(sb);
        out.close();

}
    }


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;

/**
 * Created by hama_du on 15/05/23.
 */
public class B {
    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 fr = in.nextInt();
        int to = in.nextInt();
        int d = (to-fr)/Math.abs(to-fr);

        Map<Integer,int[]> watch = new HashMap<>();
        for (int i = 0; i < m ; i++) {
            int t = in.nextInt();
            int[] lr = new int[] {in.nextInt(), in.nextInt() };
            watch.put(t, lr);
        }

        StringBuilder ans = new StringBuilder();
        int time = 1;
        while (fr != to) {
            boolean pass = true;
            int nfr = fr + d;
            if (watch.containsKey(time)) {
                int[] rng = watch.get(time);
                if ((rng[0] <= fr && fr <= rng[1]) || (rng[0] <= nfr && nfr <= rng[1])) {
                    pass = false;
                }
            }

            if (pass) {
                fr = nfr;
                ans.append(d >= 1 ? 'R' : 'L');
            } else {
                ans.append('X');
            }
            time++;
        }
        out.println(ans.toString());
        out.flush();
    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

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

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

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char)c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char)c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char)c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

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

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

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

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

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();

    Vector<Character> ans=new Vector<Character>();
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=-1;
      if(step-1<m&&step==t[step-1])
        id=step-1;
      else if(step<=t[m-1])
        id=Arrays.binarySearch(t,step);
      //out.println(id);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans.add('R');
            s++;
          }
          else
            ans.add('X');

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans.add('R');
            s--;
          }
          else
            ans.add('X');

        }
       step++;
      }
      else
      {
        if(s<f){
          ans.add('R');
          s++;
        }
        else {
          ans.add('L');
          s-=1;
        }
        step++;
      }

    }
    //out.println(ans);
    for(char ch:ans)
      out.print(ch);
    out.flush();

  }

  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();

    Vector<Character> ans=new Vector<Character>();
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=-1;
      id=Arrays.binarySearch(t,step);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans.add('R');
            s++;
          }
          else
            ans.add('X');

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans.add('L');
            s--;
          }
          else
            ans.add('X');

        }
       step++;
      }
      else
      {
        if(s<f){
          ans.add('R');
          s++;
        }
        else {
          ans.add('L');
          s-=1;
        }
        step++;
      }

    }

    for(char ch:ans)
      out.print(ch);
    out.flush();

  }

  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();
    String ans="";
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=-1;
      if(step-1<m&&step==t[step-1])
        id=step-1;
      else if(step<=t[m-1])
        id=Arrays.binarySearch(t,step);
      //out.println(id);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans+="R";
            s++;
          }
          else
            ans+="X";

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans+="L";
            s--;
          }
          else
            ans+="X";

        }
       step++;
      }
      else
      {
        if(s<f){
          ans+="R";
          s++;
        }
        else {
          ans+="L";
          s-=1;
        }
        step++;
      }

    }
    out.println(ans);
    out.flush();

  }

  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();
    String ans="";
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=Arrays.binarySearch(t,step);
      //out.println(id);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans+="R";
            s++;
          }
          else
            ans+="X";

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans+="L";
            s--;
          }
          else
            ans+="X";

        }
       step++;
      }
      else
      {
        if(s<f){
          ans+="R";
          s++;
        }
        else {
          ans+="L";
          s-=1;
        }
        step++;
      }

    }
    out.println(ans);
    out.flush();

  }

  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();
    String ans="";
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=Arrays.binarySearch(t,step);
      //out.println(id);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans+="R";
            s++;
          }
          else
            ans+="X";

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans+="L";
            s--;
          }
          else
            ans+="X";

        }
        step++;
      }
    }
    out.println(ans);
    out.flush();

  }
  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();
    String ans="";
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=-1;
      if(step==t[step-1])
        id=step-1;
      else
        id=Arrays.binarySearch(t,step);
      //out.println(id);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans+="R";
            s++;
          }
          else
            ans+="X";

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans+="L";
            s--;
          }
          else
            ans+="X";

        }
       step++;
      }
      else
      {
        if(s<f){
          ans+="R";
          s++;
        }
        else {
          ans+="L";
          s-=1;
        }
        step++;
      }

    }
    out.println(ans);
    out.flush();

  }

  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


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

public class Main342B
{
  static PrintWriter out=new PrintWriter(System.out);

  public static void main(String[] args) throws IOException
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int s=sc.nextInt();
    int f=sc.nextInt();

    Vector<Character> ans=new Vector<Character>();
    int[] l=new int[m];
    int[] t=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();
    }
    int step=1;

    while(s!=f)
    {
      int id=-1;
      if(step-1<m&&step==t[step-1])
        id=step-1;
      else if(step<=t[m-1])
        id=Arrays.binarySearch(t,step);
      //out.println(id);
      if(id>=0)
      {
        if(s<f)
        {
          if(l[id]>s+1||r[id]<s)
          {
            ans.add('R');
            s++;
          }
          else
            ans.add('X');

        }
        else
        {
          if(r[id]<s-1||l[id]>s)
          {
            ans.add('L');
            s--;
          }
          else
            ans.add('X');

        }
       step++;
      }
      else
      {
        if(s<f){
          ans.add('R');
          s++;
        }
        else {
          ans.add('L');
          s-=1;
        }
        step++;
      }

    }
    //out.println(ans);
    for(char ch:ans)
      out.print(ch);
    out.flush();

  }

  static class Scanner
  {
    BufferedReader br;
    StringTokenizer tk=new StringTokenizer("");
    public Scanner(InputStream is)
        {
      br=new BufferedReader(new InputStreamReader(is));
    }
        public int nextInt() throws IOException
        {
          if(tk.hasMoreTokens())
                return Integer.parseInt(tk.nextToken());
          tk=new StringTokenizer(br.readLine());
          return nextInt();
        }
        public long nextLong() throws IOException
        {
            if(tk.hasMoreTokens())
              return Long.parseLong(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextLong();
        }
        public String next() throws IOException
        {
          if(tk.hasMoreTokens())
            return (tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return next();
        }
        public String nextLine() throws IOException
        {
          tk=new StringTokenizer("");
          return br.readLine();
        }
        public double nextDouble() throws IOException
        {
            if(tk.hasMoreTokens())
              return Double.parseDouble(tk.nextToken());
            tk=new StringTokenizer(br.readLine());
            return nextDouble();
        }
        public char nextChar() throws IOException
        {
            if(tk.hasMoreTokens())
              return (tk.nextToken().charAt(0));
            tk=new StringTokenizer(br.readLine());
            return nextChar();
        }
        public int[] nextIntArray(int n) throws IOException
        {
            int a[]=new int[n];
            for(int i=0;i<n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArray(int n) throws IOException
        {
          long a[]=new long[n];
            for(int i=0;i<n;i++)
              a[i]=nextLong();
            return a;
        }
        public int[] nextIntArrayOneBased(int n) throws IOException
        {
          int a[]=new int[n+1];
            for(int i=1;i<=n;i++)
              a[i]=nextInt();
            return a;
        }
        public long[] nextLongArrayOneBased(int n) throws IOException
        {
          long a[]=new long[n+1];
          for(int i=1;i<=n;i++)
                a[i]=nextLong();
          return a;
        }
  }
}


import java.util.*;
import java.io.*;
import java.lang.*;
public class Codeforces{
    public static void main(String[] args) {
        FastScanner sc =new FastScanner();
        PrintWriter out=new PrintWriter(System.out);
        int n=sc.nextInt(),m=sc.nextInt(),start=sc.nextInt(),end=sc.nextInt();
        Map<Integer,Pair> map=new HashMap<>();
        for(int i=0;i<m;i++){
            map.put(sc.nextInt(),new Pair(sc.nextInt(),sc.nextInt()));
        }
        StringBuilder str =new StringBuilder();
        if(start<=end){
            int i=1;
            while(start<end){
                if(map.containsKey(i)){
                    Pair temp=map.get(i);
                    if((temp.a<=start && temp.b>=start) || (temp.a<=start+1 && temp.b>=start+1)){
                        str.append('X');
                    }
                    else{
                        start++;
                        str.append('R');
                    }
                }
                else{
                    start++;
                    str.append('R');
                }
                i++;
            }
        }
        else{
            int i=1;
            while(start>end){
                if(map.containsKey(i)){
                    Pair temp=map.get(i);
                    if((temp.a<=start && temp.b>=start) || (temp.a<=start-1 && temp.b>=start-1)){
                        str.append('X');
                    }
                    else{
                        start--;
                        str.append('L');
                    }
                }
                else{
                    start--;
                    str.append('L');
                }
                i++;
            }
        }
        out.println(str);
        out.close();
    }
}
class Pair{
    int a=0,b=0;
    Pair(int a ,int b){
        this.a=a;
        this.b=b;
    }
}
class FastScanner{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st =new StringTokenizer("");
    String next(){
        if(!st.hasMoreTokens()){
            try{
                st=new StringTokenizer(br.readLine());
            }
            catch(Exception e){
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
public class Codeforces{
    static boolean ok(int at,int left,int right){
        if(left<=at && right>=at) return false;
        return true;
    }
    public static void main(String[] args) {
        FastScanner sc =new FastScanner();
        PrintWriter out=new PrintWriter(System.out);
        StringBuilder str = new StringBuilder();
        int n=sc.nextInt(),m=sc.nextInt(),s=sc.nextInt(),end=sc.nextInt();
        int at=s;
        if(s<=end){
            for(int i=0;i<m;i++){
                int pos=sc.nextInt(),left=sc.nextInt(),right=sc.nextInt();
                if(at==end) continue;
                if(!ok(at,left,right) || !ok(at+1,left,right)){
                    str.append('X');
                }
                else{
                    str.append('R');
                    at++;
                }
            }
            while(at<end){
                str.append('R');
                at++;
            }
        }
        else{
            for(int i=0;i<m;i++){
                int pos=sc.nextInt(),left=sc.nextInt(),right=sc.nextInt();
                if(at==end) continue;
                if(!ok(at,left,right) || !ok(at+1,left,right)){
                    str.append('X');
                }
                else{
                    str.append('L');
                    at--;
                }
            }
            while(at>end){
                str.append('L');
                at--;
            }
        }
        out.println(str);
        out.close();
    }
}

class FastScanner{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st =new StringTokenizer("");
    String next(){
        if(!st.hasMoreTokens()){
            try{
                st=new StringTokenizer(br.readLine());
            }
            catch(Exception e){
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
public class Codeforces{
    static boolean ok(int at,int left,int right){
        if(left<=at && right>=at) return false;
        return true;
    }
    public static void main(String[] args) {
        FastScanner sc =new FastScanner();
        PrintWriter out=new PrintWriter(System.out);
        StringBuilder str = new StringBuilder();
        int n=sc.nextInt(),m=sc.nextInt(),s=sc.nextInt(),end=sc.nextInt();
        int at=s;
        for(int i=0;i<m;i++){
            int pos=sc.nextInt(),left=sc.nextInt(),right=sc.nextInt();
            if(at==end) continue;
            if(!ok(at,left,right) || !ok(at+1,left,right)){
                str.append('X');
            }
            else{
                str.append('R');
                at++;
            }
        }
        while(at!=end){
            str.append('R');
            at++;
        }
        out.println(str);
        out.close();
    }
}

class FastScanner{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st =new StringTokenizer("");
    String next(){
        if(!st.hasMoreTokens()){
            try{
                st=new StringTokenizer(br.readLine());
            }
            catch(Exception e){
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
public class Codeforces{
    static boolean ok(int at,int left,int right){
        if(left<=at && right>=at) return false;
        return true;
    }
    public static void main(String[] args) {
        FastScanner sc =new FastScanner();
        PrintWriter out=new PrintWriter(System.out);
        StringBuilder str = new StringBuilder();
        int n=sc.nextInt(),m=sc.nextInt(),s=sc.nextInt(),end=sc.nextInt();
        int at=s;
        for(int i=0;;i++){
            int pos=sc.nextInt(),left=sc.nextInt(),right=sc.nextInt();
            if(at==end) break;
            if(!ok(at,left,right) || !ok(at+1,left,right)){
                str.append('X');
            }
            else{
                str.append('R');
                at++;
            }
        }
        out.println(str);
        out.close();
    }
}

class FastScanner{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st =new StringTokenizer("");
    String next(){
        if(!st.hasMoreTokens()){
            try{
                st=new StringTokenizer(br.readLine());
            }
            catch(Exception e){
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
}


import java.util.*;
import java.io.*;
import java.lang.*;
public class Codeforces{
    static boolean ok(int at,int left,int right){
        if(left<=at && right>=at) return false;
        return true;
    }
    public static void main(String[] args) {
        FastScanner sc =new FastScanner();
        PrintWriter out=new PrintWriter(System.out);
        StringBuilder str = new StringBuilder();
        int n=sc.nextInt(),m=sc.nextInt(),s=sc.nextInt(),end=sc.nextInt();
        int at=s;
        for(int i=0;i<m;i++){
            int pos=sc.nextInt(),left=sc.nextInt(),right=sc.nextInt();
            if(at==end) continue;
            if(!ok(at,left,right) || !ok(at+1,left,right)){
                str.append('X');
            }
            else{
                str.append('R');
                at++;
            }

        }
        out.println(str);
        out.close();
    }
}

class FastScanner{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st =new StringTokenizer("");
    String next(){
        if(!st.hasMoreTokens()){
            try{
                st=new StringTokenizer(br.readLine());
            }
            catch(Exception e){
            }
        }
        return st.nextToken();
    }
    int nextInt(){
        return Integer.parseInt(next());
    }
}


import java.util.*;
import java.math.BigInteger;

public class Watermelon {
	static int x;
	public static void main(String[] args)  {
	       Scanner sc=new Scanner(System.in);
	       int n=sc.nextInt();
	       int m=sc.nextInt();
	       int s=sc.nextInt();
	       int f=sc.nextInt();
	       int[][] arr=new int[m][3];
	       for(int i=0;i<m;i++){
	    	   for(int j=0;j<3;j++){

	    		   arr[i][j]=sc.nextInt();
	    	   }
	       }
	       int count=s;
	       int counter=1;
	       for(int i=0;i<m;i++){
	    	 //  System.out.println(count);
	    	   if(count==f)
	    		   break;
	    	 // System.out.println(counter+"c"+count);
	    	   if(arr[i][0]!=counter){

	    		   if(count>f){
	    			   System.out.print("L");
	    			   count--;
	    		   }
	    		   else if(count<f)
	    			   {System.out.print("R");count++;}
	    		   else{}
	    		  counter++;
	    		  i--;
	    		//   continue;
	    	   }
	    	   else{ counter++;
	    		   if(s<f){
	    	//		   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		   if((arr[i][1]>count&&arr[i][1]>(count+1))||(arr[i][2]<count&&arr[i][2]<(count+1))){
	    			   count++;
	    			   System.out.print("R");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }
	    		   if(s>f){
	    		//	   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		    if((arr[i][1]>count&&arr[i][1]>(count-1))||(arr[i][2]<count&&arr[i][2]<(count-1))){
	    			   count--;
	    			   System.out.print("L");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }

	    		   }

	       }
	       while(true){
	       if(count!=f){
	    	   if(count==f)
	    		   break;
	    	   if(count<f){
	    		   count++;
	    		   System.out.print("R");
	    	   }
	    	   if(count>f){
	    		   count--;
	    		   System.out.print("L");
	    	   }
	       }}
	}

	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}

	static void display(int[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
			}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){

			}
			System.out.println();

	 }

		 static void display(long[] arr){
			 for(int i=0;i<arr.length;i++)
				 System.out.print(arr[i]+" ");
			 System.out.println();
		 }
	 static void display(double[] arr){
		// System.out.println();
			for(int i=0;i<arr.length;i++){
				System.out.println(arr[i]+" ");
			}
//			System.out.println();

		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }

	}
class Count implements Comparable{
		int i;
	    ArrayList<Integer> list=new ArrayList<>();
		Count(int i,int c){
			this.i=i;
			list.add(c);
		}
		Count(int i){
			this.i=i;
		}
		void display(){
			System.out.println(i+" "+list);
		}

		@Override
		public int compareTo(Object o) {
		   Count co=(Count)o;

		   if(co.i<this.i){
			   return 1;
		   }
		   else if(this.i<co.i){
			   return -1;
		   }
		   else
			   return 0;
		}
	}


import java.util.*;
import java.math.BigInteger;

public class Watermelon {
	static int x;
	public static void main(String[] args)  {
	       Scanner sc=new Scanner(System.in);
	       int n=sc.nextInt();
	       int m=sc.nextInt();
	       int s=sc.nextInt();
	       int f=sc.nextInt();
	       int[][] arr=new int[m][3];
	       for(int i=0;i<m;i++){
	    	   for(int j=0;j<3;j++){

	    		   arr[i][j]=sc.nextInt();
	    	   }
	       }
	       int count=s;
	       int counter=1;
	       for(int i=0;i<m;i++){
	    	 //  System.out.println(count);
	    	   if(count==f)
	    		   break;
	    	 // System.out.println(counter+"c"+count);
	    	   if(arr[i][0]!=counter){

	    		   if(count>f){
	    			   System.out.print("L");
	    			   count--;
	    		   }
	    		   else if(count<f)
	    			   {System.out.print("R");count++;}
	    		   else{}
	    		  counter++;
	    		  i--;
	    		//   continue;
	    	   }
	    	   else{ counter++;
	    		   if(s<f){
	    	//		   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		   if((arr[i][1]>count&&arr[i][1]>(count+1))||(arr[i][2]<count&&arr[i][2]<(count+1))){
	    			   count++;
	    			   System.out.print("R");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }
	    		   if(s>f){
	    		//	   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		    if((arr[i][1]>count&&arr[i][1]>(count-1))||(arr[i][2]<count&&arr[i][2]<(count-1))){
	    			   count--;
	    			   System.out.print("L");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }

	    		   }

	       }
	}

	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}

	static void display(int[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
			}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){

			}
			System.out.println();

	 }

		 static void display(long[] arr){
			 for(int i=0;i<arr.length;i++)
				 System.out.print(arr[i]+" ");
			 System.out.println();
		 }
	 static void display(double[] arr){
		// System.out.println();
			for(int i=0;i<arr.length;i++){
				System.out.println(arr[i]+" ");
			}
//			System.out.println();

		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }

	}
class Count implements Comparable{
		int i;
	    ArrayList<Integer> list=new ArrayList<>();
		Count(int i,int c){
			this.i=i;
			list.add(c);
		}
		Count(int i){
			this.i=i;
		}
		void display(){
			System.out.println(i+" "+list);
		}

		@Override
		public int compareTo(Object o) {
		   Count co=(Count)o;

		   if(co.i<this.i){
			   return 1;
		   }
		   else if(this.i<co.i){
			   return -1;
		   }
		   else
			   return 0;
		}
	}


import java.util.*;
import java.math.BigInteger;

public class Watermelon {
	static int x;
	public static void main(String[] args)  {
	       Scanner sc=new Scanner(System.in);
	       int n=sc.nextInt();
	       int m=sc.nextInt();
	       int s=sc.nextInt();
	       int f=sc.nextInt();
	       int[][] arr=new int[m][3];
	       for(int i=0;i<m;i++){
	    	   for(int j=0;j<3;j++){

	    		   arr[i][j]=sc.nextInt();
	    	   }
	       }
	       int count=s;
	       for(int i=0;i<m;i++){
	    	 //  System.out.println(count);
	    	   if(count==f)
	    		   break;
	    	   if(arr[i][0]!=i+1){

	    		   if(count>f){
	    			   System.out.print("L");
	    			   count--;continue;
	    		   }
	    		   else if(count<f)
	    			   {System.out.print("R");count++;continue;}
	    		   else{continue;}
	    	   }
	    	   else{
	    		   if(s<f){
	    	//		   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		   if((arr[i][1]>count&&arr[i][1]>(count+1))||(arr[i][1]<count&&arr[i][1]<(count+1))){
	    			   count++;
	    			   System.out.print("R");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }
	    		   if(s>f){
	    		    if((arr[i][1]>count&&arr[i][1]>(count-1))||(arr[i][1]<count&&arr[i][1]<(count-1))){
	    			   count--;
	    			   System.out.print("L");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }
	    		   }

	       }
	}

	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}

	static void display(int[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
			}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){

			}
			System.out.println();

	 }

		 static void display(long[] arr){
			 for(int i=0;i<arr.length;i++)
				 System.out.print(arr[i]+" ");
			 System.out.println();
		 }
	 static void display(double[] arr){
		// System.out.println();
			for(int i=0;i<arr.length;i++){
				System.out.println(arr[i]+" ");
			}
//			System.out.println();

		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }

	}
class Count implements Comparable{
		int i;
	    ArrayList<Integer> list=new ArrayList<>();
		Count(int i,int c){
			this.i=i;
			list.add(c);
		}
		Count(int i){
			this.i=i;
		}
		void display(){
			System.out.println(i+" "+list);
		}

		@Override
		public int compareTo(Object o) {
		   Count co=(Count)o;

		   if(co.i<this.i){
			   return 1;
		   }
		   else if(this.i<co.i){
			   return -1;
		   }
		   else
			   return 0;
		}
	}


import java.util.*;
import java.math.BigInteger;

public class Watermelon {
	static int x;
	public static void main(String[] args)  {
	       Scanner sc=new Scanner(System.in);
	       int n=sc.nextInt();
	       int m=sc.nextInt();
	       int s=sc.nextInt();
	       int f=sc.nextInt();
	       int[][] arr=new int[m][3];
	       for(int i=0;i<m;i++){
	    	   for(int j=0;j<3;j++){

	    		   arr[i][j]=sc.nextInt();
	    	   }
	       }
	       int count=s;
	       int counter=1;
	       for(int i=0;i<m;i++){
	    	 //  System.out.println(count);
	    	   if(count==f)
	    		   break;
	    	 // System.out.println(counter+"c"+count);
	    	   if(arr[i][0]!=counter){

	    		   if(count>f){
	    			   System.out.print("L");
	    			   count--;
	    		   }
	    		   else if(count<f)
	    			   {System.out.print("R");count++;}
	    		   else{}
	    		  counter++;
	    		  i--;
	    		//   continue;
	    	   }
	    	   else{ counter++;
	    		   if(s<f){
	    	//		   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		   if((arr[i][1]>count&&arr[i][1]>(count+1))||(arr[i][2]<count&&arr[i][2]<(count+1))){
	    			   count++;
	    			   System.out.print("R");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }
	    		   if(s>f){
	    		//	   System.out.println(arr[i][1]+" "+arr[i][2]+" "+count);
	    		    if((arr[i][1]>count&&arr[i][1]>(count-1))||(arr[i][2]<count&&arr[i][2]<(count-1))){
	    			   count--;
	    			   System.out.print("L");
	    			   continue;
	    		   }
	    		   else {System.out.print("X");continue;}
	    		   }

	    		   }

	       }
	       while(true){
	    	   if(count==f)
	    		   break;
	    	   if(count!=f){
	    	   if(count<f){
	    		   count++;
	    		   System.out.print("R");
	    	   }
	    	   if(count>f){
	    		   count--;
	    		   System.out.print("L");
	    	   }
	       }}
	}

	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}

	static void display(int[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
			}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){

			}
			System.out.println();

	 }

		 static void display(long[] arr){
			 for(int i=0;i<arr.length;i++)
				 System.out.print(arr[i]+" ");
			 System.out.println();
		 }
	 static void display(double[] arr){
		// System.out.println();
			for(int i=0;i<arr.length;i++){
				System.out.println(arr[i]+" ");
			}
//			System.out.println();

		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }

	}
class Count implements Comparable{
		int i;
	    ArrayList<Integer> list=new ArrayList<>();
		Count(int i,int c){
			this.i=i;
			list.add(c);
		}
		Count(int i){
			this.i=i;
		}
		void display(){
			System.out.println(i+" "+list);
		}

		@Override
		public int compareTo(Object o) {
		   Count co=(Count)o;

		   if(co.i<this.i){
			   return 1;
		   }
		   else if(this.i<co.i){
			   return -1;
		   }
		   else
			   return 0;
		}
	}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Problem63 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		out=new PrintWriter (new BufferedOutputStream(System.out));
		FastReader s=new FastReader();
		int n=s.nextInt();
		int m=s.nextInt();
		int start=s.nextInt();
		int end=s.nextInt();
		StringBuilder ans=new StringBuilder();
		int countmove=1;
		int[][] input=new int[m][3];
		for(int i=0;i<m;i++) {
			input[i][0]=s.nextInt();
			input[i][1]=s.nextInt();
			input[i][2]=s.nextInt();
		}
		int ptr=0;
		while(start!=end) {
			int move=start>end?-1:1;
			if(countmove==input[ptr][0]) {
				if((input[ptr][1]<=start && input[ptr][2]>=start)||(input[ptr][1]<=start+move && input[ptr][2]>=start+move)) {
					ans.append("X");
				}else {
					if(move==-1)ans.append('L');
					else ans.append("R");
					start+=move;
				}
				ptr++;
			}else {
				if(move==-1)ans.append('L');
				else ans.append("R");
				start+=move;
			}
			countmove++;
		}
		out.println(ans);
		out.close();
	}

	public static PrintWriter out;

	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception e) {
				e.printStackTrace();
			}
			return str;
		}
	}

}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Problem63 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		out=new PrintWriter (new BufferedOutputStream(System.out));
		FastReader s=new FastReader();
		int n=s.nextInt();
		int m=s.nextInt();
		int start=s.nextInt();
		int end=s.nextInt();
		StringBuilder ans=new StringBuilder();
		int countmove=1;
		int[][] input=new int[m][3];
		for(int i=0;i<m;i++) {
			input[i][0]=s.nextInt();
			input[i][1]=s.nextInt();
			input[i][2]=s.nextInt();
		}
		int ptr=0;
		while(start!=end) {
			int move=start>end?-1:1;
			if(ptr<m && countmove==input[ptr][0]) {
				if((input[ptr][1]<=start && input[ptr][2]>=start)||(input[ptr][1]<=start+move && input[ptr][2]>=start+move)) {
					ans.append("X");
				}else {
					if(move==-1)ans.append('L');
					else ans.append("R");
					start+=move;
				}
				ptr++;
			}else {
				if(move==-1)ans.append('L');
				else ans.append("R");
				start+=move;
			}
			countmove++;
		}
		out.println(ans);
		out.close();
	}

	public static PrintWriter out;

	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception e) {
				e.printStackTrace();
			}
			return str;
		}
	}

}


import java.io.*;
import java.util.*;
public class IEEE {

    public static void main(String[] args) throws IOException {
    //Scanner sc=new Scanner(System.in);
    BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer ss=new StringTokenizer(r.readLine());
    int n=Integer.parseInt(ss.nextToken());
    int m=Integer.parseInt(ss.nextToken());
    int s=Integer.parseInt(ss.nextToken());
    int f=Integer.parseInt(ss.nextToken());

    int[][] st=new int[m][3];
    for(int i=0;i<m;i++){
        ss=new StringTokenizer(r.readLine());
        st[i][0]=Integer.parseInt(ss.nextToken());
        st[i][1]=Integer.parseInt(ss.nextToken());
        st[i][2]=Integer.parseInt(ss.nextToken());
    }
    //________________ansewer start here__________________\\
    char d=(s<f?'R':'L');
    int steps=0;
    int sq=0;
    if(s<f){
        while (s!=f){
            if(steps+1==st[sq][0]){
                if(s+1<st[sq][1] || s>st[sq][2]){
                    System.out.print(d);
                    s++;
                }else System.out.print("X");
            sq++;
            }else{
                System.out.print(d);
                s++;
            }
            steps++;
        }
    }else{
        while(s!=f){
            if(steps+1==st[sq][0]){

                if(s-1 > st[sq][2] || s < st[sq][1]){
                    System.out.println(d);
                    s--;
                }else System.out.print("X");
             sq++;
            }else{
                System.out.print(d);
                s--;
            }
            steps++;
        }

    }

    }
    public static void dis(int a[]){
        for(int i:a){
            System.out.print(i+" ");
        }
        System.out.println("");
    }
}


import java.io.*;
import java.util.*;
public class IEEE {

    public static void main(String[] args) throws IOException {
    //Scanner sc=new Scanner(System.in);
    BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer ss=new StringTokenizer(r.readLine());
    int n=Integer.parseInt(ss.nextToken());
    int m=Integer.parseInt(ss.nextToken());
    int s=Integer.parseInt(ss.nextToken());
    int f=Integer.parseInt(ss.nextToken());

    int[][] st=new int[m][3];
    for(int i=0;i<m;i++){
        ss=new StringTokenizer(r.readLine());
        st[i][0]=Integer.parseInt(ss.nextToken());
        st[i][1]=Integer.parseInt(ss.nextToken());
        st[i][2]=Integer.parseInt(ss.nextToken());
    }
    //________________ansewer start here__________________\\
    char d=(s<f?'R':'L');
    int steps=0;
    int sq=0;
    if(s<f){
        while (s!=f){
            if(sq>=st.length){
                System.out.print(d);
                s++;
            }
            else if(steps+1==st[sq][0]){
                if(s+1<st[sq][1] || s>st[sq][2]){
                    System.out.print(d);
                    s++;
                }else System.out.print("X");
            sq++;
            }else{
                System.out.print(d);
                s++;
            }
            steps++;
        }
    }else{
        while(s!=f){
            if(steps+1==st[sq][0]){

                if(s-1 > st[sq][2] || s < st[sq][1]){
                    System.out.println(d);
                    s--;
                }else System.out.print("X");
             sq++;
            }else{
                System.out.print(d);
                s--;
            }
            steps++;
        }

    }

    }
    public static void dis(int a[]){
        for(int i:a){
            System.out.print(i+" ");
        }
        System.out.println("");
    }
}


import java.io.*;
import java.util.*;
public class IEEE {

    public static void main(String[] args) throws IOException {
    //Scanner sc=new Scanner(System.in);
    BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer ss=new StringTokenizer(r.readLine());
    int n=Integer.parseInt(ss.nextToken());
    int m=Integer.parseInt(ss.nextToken());
    int s=Integer.parseInt(ss.nextToken());
    int f=Integer.parseInt(ss.nextToken());

    int[][] st=new int[m][3];
    for(int i=0;i<m;i++){
        ss=new StringTokenizer(r.readLine());
        st[i][0]=Integer.parseInt(ss.nextToken());
        st[i][1]=Integer.parseInt(ss.nextToken());
        st[i][2]=Integer.parseInt(ss.nextToken());
    }
    //________________ansewer start here__________________\\
    char d=(s<f?'R':'L');
    int steps=0;
    int sq=0;
    if(s<f){
        while (s!=f){
            if(sq>=st.length){
                System.out.print(d);
                s++;
            }
            else if(steps+1==st[sq][0]){
                if(s+1<st[sq][1] || s>st[sq][2]){
                    System.out.print(d);
                    s++;
                }else System.out.print("X");
            sq++;
            }else{
                System.out.print(d);
                s++;
            }
            steps++;
        }
    }else{
        while(s!=f){
            if(steps+1==st[sq][0]){

                if(s-1 > st[sq][2] || s < st[sq][1]){
                    System.out.print(d);
                    s--;
                }else System.out.print("X");
             sq++;
            }else{
                System.out.print(d);
                s--;
            }
            steps++;
        }

    }

    }
    public static void dis(int a[]){
        for(int i:a){
            System.out.print(i+" ");
        }
        System.out.println("");
    }
}


import java.io.*;
import java.util.*;
public class IEEE {

    public static void main(String[] args) throws IOException {
    //Scanner sc=new Scanner(System.in);
    BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer ss=new StringTokenizer(r.readLine());
    int n=Integer.parseInt(ss.nextToken());
    int m=Integer.parseInt(ss.nextToken());
    int s=Integer.parseInt(ss.nextToken());
    int f=Integer.parseInt(ss.nextToken());

    int[][] st=new int[m][3];
    for(int i=0;i<m;i++){
        ss=new StringTokenizer(r.readLine());
        st[i][0]=Integer.parseInt(ss.nextToken());
        st[i][1]=Integer.parseInt(ss.nextToken());
        st[i][2]=Integer.parseInt(ss.nextToken());
    }
    //________________ansewer start here__________________\\
    char d=(s<f?'R':'L');
    int steps=0;
    if(s<f){
        while (s!=f){
            if(steps+1==st[steps][0]){
                if(s+1<st[steps][1] || s>st[steps][2]){
                    System.out.print(d);
                    s++;
                }else System.out.print("X");
            }else{
                System.out.print(d);
                s++;
            }
            steps++;
        }
    }else{
        while(s!=f){
            if(steps+1==st[steps][0]){
                if(s-1 > st[steps][2] || s < st[steps][1]){
                    System.out.println(d);
                    s--;
                }else System.out.print("X");
            }else{
                System.out.print(d);
                s--;
            }
            steps++;
        }

    }

    }
    public static void dis(int a[]){
        for(int i:a){
            System.out.print(i+" ");
        }
        System.out.println("");
    }
}


import java.io.*;
import java.util.*;
public class IEEE {

    public static void main(String[] args) throws IOException {
    //Scanner sc=new Scanner(System.in);
    BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer ss=new StringTokenizer(r.readLine());
    int n=Integer.parseInt(ss.nextToken());
    int m=Integer.parseInt(ss.nextToken());
    int s=Integer.parseInt(ss.nextToken());
    int f=Integer.parseInt(ss.nextToken());

    int[][] st=new int[m][3];
    for(int i=0;i<m;i++){
        ss=new StringTokenizer(r.readLine());
        st[i][0]=Integer.parseInt(ss.nextToken());
        st[i][1]=Integer.parseInt(ss.nextToken());
        st[i][2]=Integer.parseInt(ss.nextToken());
    }
    //________________ansewer start here__________________\\
    char d=(s<f?'R':'L');
    int steps=0;
    int sq=0;
    if(s<f){
        while (s!=f){
            if(sq>=st.length){
                System.out.print(d);
                s++;
            }
            else if(steps+1==st[sq][0]){
                if(s+1<st[sq][1] || s>st[sq][2]){
                    System.out.print(d);
                    s++;
                }else System.out.print("X");
            sq++;
            }else{
                System.out.print(d);
                s++;
            }
            steps++;
        }
    }else{
        while(s!=f){
                if(sq>=st.length){
                System.out.print(d);
                s--;
            }
                else if(steps+1==st[sq][0]){

                if(s-1 > st[sq][2] || s < st[sq][1]){
                    System.out.print(d);
                    s--;
                }else System.out.print("X");
             sq++;
            }else{
                System.out.print(d);
                s--;
            }
            steps++;
        }

    }

    }
    public static void dis(int a[]){
        for(int i:a){
            System.out.print(i+" ");
        }
        System.out.println("");
    }
}


import java.io.*;
import java.util.*;
public class IEEE {

    public static void main(String[] args) throws IOException {
    //Scanner sc=new Scanner(System.in);
    BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer ss=new StringTokenizer(r.readLine());
    int n=Integer.parseInt(ss.nextToken());
    int m=Integer.parseInt(ss.nextToken());
    int s=Integer.parseInt(ss.nextToken());
    int f=Integer.parseInt(ss.nextToken());

    int[][] st=new int[m][3];
    for(int i=0;i<m;i++){
        ss=new StringTokenizer(r.readLine());
        st[i][0]=Integer.parseInt(ss.nextToken());
        st[i][1]=Integer.parseInt(ss.nextToken());
        st[i][2]=Integer.parseInt(ss.nextToken());
    }
    //________________ansewer start here__________________\\
    char d=(s<f?'R':'L');
    int steps=0;
    if(s<f){
        while (s!=f){
            if(steps+1==st[steps][0]){
                if(s+1<st[steps][1] || s>st[steps][2]){
                    System.out.print(d);
                    s++;
                }else System.out.print("X");
            }else{
                System.out.print(d);
                s++;
            }
            steps++;
        }
    }else{
        while(s!=f){
            if(steps+1==st[steps][0]){
                if(s-1 < st[steps][2] || s < st[steps][1]){
                    System.out.println(d);
                    s--;
                }else System.out.print("X");
            }else{
                System.out.print(d);
                s--;
            }
            steps++;
        }

    }

    }
    public static void dis(int a[]){
        for(int i:a){
            System.out.print(i+" ");
        }
        System.out.println("");
    }
}


/*
 ~/BAU/ACM-ICPC/Teams/Rampage/MMZA
 ~/sudo apt-get verdict Accepted
 practice...
*/
//package javaapplication1;

//import java.util.Scanner;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static final int Mod=(int)1e9+7;
    static final int N=(int)2e5+5;
    public static void main(String[] args) throws IOException {
       // Reader.init(System.in);
        //Scanner in=new Scanner(new FileInputStream("input.txt"));
        FastReader in=new FastReader();
        //in=new FileReader("input.txt");
        //PrintWriter out=new PrintWriter(new FileOutputStream("output.txt"));
        PrintWriter out=new PrintWriter(System.out);
        Main ob=new Main();
        int n=in.nextInt(),m=in.nextInt(),s=in.nextInt(),f=in.nextInt(),last=0;
        ArrayList<pair> res=new ArrayList();
        if(s<f){
            for(int i=0;i<m&&s<f;i++){
                int t=in.nextInt(),l=in.nextInt(),r=in.nextInt();
                if(t-last-1>0){
                    res.add(new pair('R',t-last-1));
                    s+=t-last-1;
                }
                if((s<l||s>r)&&(s+1<l||s+1>r)){
                    res.add(new pair('R',1));
                    s++;
                }
                else{
                    res.add(new pair('X',1));
                }
                last=t;
            }
        }
        else{
            for(int i=0;i<m&&s>f;i++){
                int t=in.nextInt(),l=in.nextInt(),r=in.nextInt();
                if(t-last-1>0){
                    res.add(new pair('L',t-last-1));
                    s-=t-last-1;
                }
                if((s<l||s>r)&&(s-1<l||s-1>r)){
                    res.add(new pair('L',1));
                    s--;
                }
                else{
                    res.add(new pair('X',1));
                }
                last=t;
            }
        }
        String ans="";
        for(int i=0;i<res.size();i++){
            pair cur=res.get(i);
            while(cur.second>0)
            {
                ans+=cur.first;
                cur.second--;
            }
        }
        out.println(ans);

        out.close();
    }
    static int[] reverse(int [] arr){
        ArrayList<Integer> temp=new ArrayList();
        for(int i=0;i<arr.length;i++)
            temp.add(arr[i]);
        Collections.reverse(temp);
        for(int i=0;i<temp.size();i++)
            arr[i]=temp.get(i);
        return arr;
    }
    static String reverse(String s){
        String temp="";
        for(int i=s.length()-1;i>=0;i--)
            temp+=s.charAt(i);
        return temp;
    }
    static String sort(String inputString)
    {
        ArrayList<Character> arr=new ArrayList();
        for(int i=0;i<inputString.length();i++)
            arr.add(inputString.charAt(i));
        Collections.sort(arr);
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<arr.size();i++)
            sb.append(arr.get(i));

        return sb.toString();
    }

    static boolean next_permutation(int[] p, int len) {
        int a = len - 2;
        while (a >= 0 && p[a] >= p[a + 1]) {
            a--;
        }

        if (a == -1) {
            return false;
        }

        int b = len - 1;
        while (p[b] <= p[a]) {
            b--;
        }

        p[a] += p[b];
        p[b] = p[a] - p[b];
        p[a] -= p[b];

        for (int i = a + 1, j = len - 1; i < j; i++, j--) {
            p[i] += p[j];
            p[j] = p[i] - p[j];
            p[i] -= p[j];
        }

        return true;
    }
    static int lower_bound(ArrayList<Integer> arr,int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp > 0) {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            } else {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            }
            mid = (lo + hi)/2;
        }
    }
    static int upper_bound(ArrayList<Integer> arr, int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp < 0) {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            } else {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            }
            mid = (lo + hi)/2;
        }
    }
    static int gcd(int a,int b){
        return b==0?a:gcd(b,a%b);
    }
    static double dot(Point p,Point q){
        return (p.x*q.x+p.y*q.y);
    }
    static double cross(Point p,Point q){
        return (p.x*q.y-p.y*q.x);
    }
    static Point computeLineIntersection(Point a,Point b,Point c,Point d){
        b=b.sub(a);d=c.sub(d);c=c.sub(a);
        return a.add(b.mulCon(cross(c,d)).devideCon(cross(b,d)));
    }
   static class FastReader
        {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}
class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    static void init(InputStream input) throws UnsupportedEncodingException {
        reader = new BufferedReader(
                new InputStreamReader(input, "UTF-8"));
        tokenizer = new StringTokenizer("");
    }

    static void init(String url) throws FileNotFoundException {
        reader = new BufferedReader(new FileReader(url));
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static String nextLine() throws IOException {
        return reader.readLine();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
}
class Point{
    double x,y;
    Point(double _x,double _y){
        x=_x;
        y=_y;
    }
    Point add(final Point p){
        return new Point(x+p.x,y+p.y);
    }
    Point sub(final Point p){
        return new Point(x-p.x,y-p.y);
    }
    Point mulCon(final double c){
        return new Point(c*x,c*y);
    }
    Point devideCon(final double c){
        return new Point(x/c,y/c);
    }
}
class  pair implements Comparator<pair>{
    char first;
    int second;
    pair(){}
    pair(char a,int b){
        first = a;
        second = b;
    }
   /* pair(pair a,pair b){
        first = a;
        second = b;
    }*/
    @Override
    public int compare(pair a,pair b){
        return (a.first-b.first);
    }
}


/*
 ~/BAU/ACM-ICPC/Teams/Rampage/MMZA
 ~/sudo apt-get verdict Accepted
 practice...
*/
//package javaapplication1;

//import java.util.Scanner;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static final int Mod=(int)1e9+7;
    static final int N=(int)2e5+5;
    public static void main(String[] args) throws IOException {
       // Reader.init(System.in);
        //Scanner in=new Scanner(new FileInputStream("input.txt"));
        FastReader in=new FastReader();
        StringBuilder sb=new StringBuilder();
        //in=new FileReader("input.txt");
        //PrintWriter out=new PrintWriter(new FileOutputStream("output.txt"));
        PrintWriter out=new PrintWriter(System.out);
        Main ob=new Main();
        int n=in.nextInt(),m=in.nextInt(),s=in.nextInt(),f=in.nextInt(),last=0;
        if(s==f){
            out.println("X");
            out.close();
            return;
        }

        for(int i=1;i<=m&&s!=f;i++){

            int t=in.nextInt();
            int l=in.nextInt();
            int r=in.nextInt();

            while(last+1<t&&s!=f){
                if(s<f){
                    sb.append('R');
                    s++;
                }
                else if(s>f){
                    sb.append('L');
                    s--;
                }
                last++;
            }
            last=t;

            if(s==f)
                break;

            if(s>=l&&s<=r){
                sb.append('X');
                continue;
            }

            if(s<f){
                if(s+1>=l&&s+1<=r)
                    sb.append('X');
                else{
                    sb.append('R');
                    s++;
                }
            }
            else {
                if(s-1>=l&&s-1<=r)
                    sb.append('X');
                else{
                    sb.append('L');
                    s--;
                }
            }
        }
        while(s!=f){
            if(s<f){
                sb.append('R');
                s++;
            }
            else {
                sb.append('L');
                s--;
            }
        }
        out.println(sb);
        out.close();
    }

    static int[] reverse(int [] arr){
        ArrayList<Integer> temp=new ArrayList();
        for(int i=0;i<arr.length;i++)
            temp.add(arr[i]);
        Collections.reverse(temp);
        for(int i=0;i<temp.size();i++)
            arr[i]=temp.get(i);
        return arr;
    }
    static String reverse(String s){
        String temp="";
        for(int i=s.length()-1;i>=0;i--)
            temp+=s.charAt(i);
        return temp;
    }
    static String sort(String inputString)
    {
        ArrayList<Character> arr=new ArrayList();
        for(int i=0;i<inputString.length();i++)
            arr.add(inputString.charAt(i));
        Collections.sort(arr);
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<arr.size();i++)
            sb.append(arr.get(i));

        return sb.toString();
    }

    static boolean next_permutation(int[] p, int len) {
        int a = len - 2;
        while (a >= 0 && p[a] >= p[a + 1]) {
            a--;
        }

        if (a == -1) {
            return false;
        }

        int b = len - 1;
        while (p[b] <= p[a]) {
            b--;
        }

        p[a] += p[b];
        p[b] = p[a] - p[b];
        p[a] -= p[b];

        for (int i = a + 1, j = len - 1; i < j; i++, j--) {
            p[i] += p[j];
            p[j] = p[i] - p[j];
            p[i] -= p[j];
        }

        return true;
    }
    static int lower_bound(ArrayList<Integer> arr,int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp > 0) {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            } else {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            }
            mid = (lo + hi)/2;
        }
    }
    static int upper_bound(ArrayList<Integer> arr, int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp < 0) {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            } else {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            }
            mid = (lo + hi)/2;
        }
    }
    static int gcd(int a,int b){
        return b==0?a:gcd(b,a%b);
    }
    static double dot(Point p,Point q){
        return (p.x*q.x+p.y*q.y);
    }
    static double cross(Point p,Point q){
        return (p.x*q.y-p.y*q.x);
    }
    static Point computeLineIntersection(Point a,Point b,Point c,Point d){
        b=b.sub(a);d=c.sub(d);c=c.sub(a);
        return a.add(b.mulCon(cross(c,d)).devideCon(cross(b,d)));
    }
   static class FastReader
        {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}
class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    static void init(InputStream input) throws UnsupportedEncodingException {
        reader = new BufferedReader(
                new InputStreamReader(input, "UTF-8"));
        tokenizer = new StringTokenizer("");
    }

    static void init(String url) throws FileNotFoundException {
        reader = new BufferedReader(new FileReader(url));
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static String nextLine() throws IOException {
        return reader.readLine();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
}
class Point{
    double x,y;
    Point(double _x,double _y){
        x=_x;
        y=_y;
    }
    Point add(final Point p){
        return new Point(x+p.x,y+p.y);
    }
    Point sub(final Point p){
        return new Point(x-p.x,y-p.y);
    }
    Point mulCon(final double c){
        return new Point(c*x,c*y);
    }
    Point devideCon(final double c){
        return new Point(x/c,y/c);
    }
}
class  pair implements Comparator<pair>{
    int  first;
    int  second;
    //int third;
    pair(){}
    pair(int a,int s){
        first = a;
        second = s;

    }

   /* pair(pair a,pair b){
        first = a;
        second = b;
    }*/
    @Override
    public int compare(pair a,pair b){
        return (a.first-b.first);
    }
}


/*
 ~/BAU/ACM-ICPC/Teams/Rampage/MMZA
 ~/sudo apt-get verdict Accepted
 practice...
*/
//package javaapplication1;

//import java.util.Scanner;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

public class Main {
    static final int Mod=(int)1e9+7;
    static final int N=(int)2e5+5;
    public static void main(String[] args) throws IOException {
       // Reader.init(System.in);
        //Scanner in=new Scanner(new FileInputStream("input.txt"));
        FastReader in=new FastReader();
        StringBuilder sb=new StringBuilder();
        //in=new FileReader("input.txt");
        //PrintWriter out=new PrintWriter(new FileOutputStream("output.txt"));
        PrintWriter out=new PrintWriter(System.out);
        Main ob=new Main();
        int n=in.nextInt(),m=in.nextInt(),s=in.nextInt(),f=in.nextInt(),last=0;
        String res="";
        for(int i=1;i<=m&&s!=f;i++){

            int t=in.nextInt();
            int l=in.nextInt();
            int r=in.nextInt();

            while(last+1<t&&s!=f){
                if(s<f){
                    res+='R';
                    s++;
                }
                else if(s>f){
                    res+='L';
                    s--;
                }
                last++;
            }
            last=t;

            if(s==f)
                break;

            if((s>=l&&s<=r)||(s+1>=l&&s+1<=r))
                res+='X';
            else {
                if(s<f){
                    res+='R';
                    s++;
                }
                else {
                    res+='L';
                    s--;
                }
            }
        }
        out.println(res);

        out.close();
    }

    static int[] reverse(int [] arr){
        ArrayList<Integer> temp=new ArrayList();
        for(int i=0;i<arr.length;i++)
            temp.add(arr[i]);
        Collections.reverse(temp);
        for(int i=0;i<temp.size();i++)
            arr[i]=temp.get(i);
        return arr;
    }
    static String reverse(String s){
        String temp="";
        for(int i=s.length()-1;i>=0;i--)
            temp+=s.charAt(i);
        return temp;
    }
    static String sort(String inputString)
    {
        ArrayList<Character> arr=new ArrayList();
        for(int i=0;i<inputString.length();i++)
            arr.add(inputString.charAt(i));
        Collections.sort(arr);
        StringBuilder sb=new StringBuilder();
        for(int i=0;i<arr.size();i++)
            sb.append(arr.get(i));

        return sb.toString();
    }

    static boolean next_permutation(int[] p, int len) {
        int a = len - 2;
        while (a >= 0 && p[a] >= p[a + 1]) {
            a--;
        }

        if (a == -1) {
            return false;
        }

        int b = len - 1;
        while (p[b] <= p[a]) {
            b--;
        }

        p[a] += p[b];
        p[b] = p[a] - p[b];
        p[a] -= p[b];

        for (int i = a + 1, j = len - 1; i < j; i++, j--) {
            p[i] += p[j];
            p[j] = p[i] - p[j];
            p[i] -= p[j];
        }

        return true;
    }
    static int lower_bound(ArrayList<Integer> arr,int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp > 0) {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            } else {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            }
            mid = (lo + hi)/2;
        }
    }
    static int upper_bound(ArrayList<Integer> arr, int key) {
        int len = arr.size();
        int lo = 0;
        int hi = len-1;
        int mid = (lo + hi)/2;
        while (true) {
            int cmp = (arr.get(mid)==key?1:0);
            if (cmp == 0 || cmp < 0) {
                lo = mid+1;
                if (hi < lo)
                    return mid<len-1?mid+1:-1;
            } else {
                hi = mid-1;
                if (hi < lo)
                    return mid;
            }
            mid = (lo + hi)/2;
        }
    }
    static int gcd(int a,int b){
        return b==0?a:gcd(b,a%b);
    }
    static double dot(Point p,Point q){
        return (p.x*q.x+p.y*q.y);
    }
    static double cross(Point p,Point q){
        return (p.x*q.y-p.y*q.x);
    }
    static Point computeLineIntersection(Point a,Point b,Point c,Point d){
        b=b.sub(a);d=c.sub(d);c=c.sub(a);
        return a.add(b.mulCon(cross(c,d)).devideCon(cross(b,d)));
    }
   static class FastReader
        {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

}
class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    static void init(InputStream input) throws UnsupportedEncodingException {
        reader = new BufferedReader(
                new InputStreamReader(input, "UTF-8"));
        tokenizer = new StringTokenizer("");
    }

    static void init(String url) throws FileNotFoundException {
        reader = new BufferedReader(new FileReader(url));
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static String nextLine() throws IOException {
        return reader.readLine();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
}
class Point{
    double x,y;
    Point(double _x,double _y){
        x=_x;
        y=_y;
    }
    Point add(final Point p){
        return new Point(x+p.x,y+p.y);
    }
    Point sub(final Point p){
        return new Point(x-p.x,y-p.y);
    }
    Point mulCon(final double c){
        return new Point(c*x,c*y);
    }
    Point devideCon(final double c){
        return new Point(x/c,y/c);
    }
}
class  pair implements Comparator<pair>{
    int  first;
    int  second;
    //int third;
    pair(){}
    pair(int a,int s){
        first = a;
        second = s;

    }

   /* pair(pair a,pair b){
        first = a;
        second = b;
    }*/
    @Override
    public int compare(pair a,pair b){
        return (a.first-b.first);
    }
}