import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int j_norm = Math.abs(j_end - j_start); int i_norm = Math.abs(i_end - i_start); int numberofmoves = 0; if (i_norm % 2 != 0 || ((i_norm / 2) % 2 == 0 && j_norm % 2 == 1) || ((i_norm / 2) % 2 == 1 && j_norm % 2 == 0)) { System.out.println("Impossible"); return; } else { numberofmoves = (i_norm / 2) + ((j_norm - i_norm / 2) / 2); // System.out.println(numberofmoves); } int j_real = (j_end - j_start); int i_real = (i_end - i_start); int i_current = i_start; int j_current = j_start; // First go in y_axes then go x_axes int movecount = 0; String dd = ""; while (j_norm > 0 || i_norm > 0) { j_real = (j_end - j_current); i_real = (i_end - i_current); // System.out.println(i_real + " " + j_real); if (Math.abs(i_real) <= 0 && Math.abs(j_real) <= 0) { System.out.println(movecount); System.out.print(dd); break; } movecount++; if (i_real < 0) { if (j_real == 0 && j_current - 1 > 0) { dd = dd + "UL "; //System.out.print("UL "); i_current -= 2; j_current -= 1; continue; } else if (j_real == 0 && j_current + 1 < n) { dd = dd + "UR "; //System.out.print("UR "); i_current -= 2; j_current += 1; continue; } else if (j_real > 0) { dd = dd + "UR "; // System.out.print("UR "); i_current -= 2; j_current += 1; continue; } else { dd = dd + "UL "; //System.out.print("UL "); i_current -= 2; j_current -= 1; continue; } } else if (j_real > 0) { dd = dd + "R "; // System.out.print("R "); j_current += +2; continue; } else if (i_real > 0) { if (j_real == 0 && j_current + 1 < n) { dd = dd + "LR "; //System.out.print("LR "); i_current += 2; j_current += 1; continue; } else if (j_real == 0 && j_current - 1 >= 0) { dd=dd+"LL "; //System.out.print("LL "); i_current += 2; j_current -= 1; continue; } else if (j_real > 0) { dd=dd+"LR "; // System.out.print("LR "); i_current += 2; j_current += 1; continue; } else { dd=dd+"LL "; //System.out.print("LL "); i_current += 2; j_current -= 1; continue; } } else if (j_real < 0) { dd=dd+"L "; //System.out.print("L "); j_current += -2; continue; } } } 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(); } }