import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int move=0; static String se=""; static void printShortestPath(int n, int iS, int jS, int iE, int jE) { // Print the distance along with the sequence of moves. if (iS < iE && iS >= 0 && iS <= n && jS >= 0 && jS <= n && iE >= 0 && jE <= n && jE >= 0 && iE <= n) { if (jS < jE) { se += "LR "; move = move + 1; printShortestPath(n, iS + 2, jS + 1, iE, jE); } else if (jS > jE) { se += "LL "; move = move + 1; printShortestPath(n,iS + 2, jS - 1, iE, jE); } else if (jS == jE) { if(iS+2=0){ se+="LL "; move+=1; printShortestPath(n, iS + 2, jS - 1, iE, jE); } else System.out.println("Impossible"); } } else if (iS > iE && iS >= 0 && iS <= n && jS >= 0 && jS <= n && iE >= 0 && jE <= n && jE >= 0 && iE <= n) { if (jS < jE) { se += "UR "; move += 1; printShortestPath(n, iS - 2, jS + 1, iE, jE); } else if (jS > jE) { se += "UL "; move += 1; printShortestPath(n, iS - 2, jS - 1, iE, jE); } else if (jS == jE) { if(iS-2>=0 && jS+1=0 && jS-1>=0){ se+="UR "; move+=1; printShortestPath(n, iS - 2, jS - 1, iE, jE); } else System.out.println("Impossible"); } } else if (iS == iE && iS >= 0 && iS <= n && jS >= 0 && jS <= n && iE >= 0 && jE <= n && jE >= 0 && iE <= n) { if (jS < jE) { se += "R "; move += 1; printShortestPath(n, iS, jS + 2, iE, jE); } else if (jS > jE) { se += "L "; move += 1; printShortestPath(n, iS, jS - 2, iE, jE); } else if (jS == jE) { System.out.println(move); System.out.println(se); } } else System.out.println("Impossible"); } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int i_start = in.nextInt(); int j_start = in.nextInt(); int i_end = in.nextInt(); int j_end = in.nextInt(); printShortestPath(n, i_start, j_start, i_end, j_end); in.close(); } }