import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static final String IMPOSSIBLE = "Impossible"; static void printShortestPath(int n, int row_start, int col_start, int row_end, int col_end) { int colDist = Math.abs(col_end - col_start); int rowDist = Math.abs(row_end - row_start); if (rowDist % 2 != 0) { System.out.println(IMPOSSIBLE); return; } int colType = rowDist / 2 + 1; boolean canAccessEvenCol = (colType % 2 != 0); if (canAccessEvenCol && (colDist % 2 != 0)) { System.out.println(IMPOSSIBLE); return; } else if (!canAccessEvenCol && (colDist % 2 == 0)) { System.out.println(IMPOSSIBLE); return; } int jumps = colDist / 2; int jumpsTaken = 0; StringBuilder operations = new StringBuilder(); int currCol = col_start; int currRow = row_start; while (currRow != row_end) { if (row_end < currRow) { if (col_end < currCol) { operations.append("UL "); currRow -= 2; currCol -= 1; } else if (col_end > currCol) { operations.append("UR "); currRow -= 2; currCol += 1; } } else if (row_end > currRow) { if (col_end < currCol) { operations.append("LL "); currRow += 2; currCol -= 1; } else if (col_end > currCol) { operations.append("LR "); currRow += 2; currCol += 1; } } jumpsTaken++; } while (currCol != col_end) { if (col_end < currCol) { operations.append("L "); currCol -= 2; } else { operations.append("R "); currCol += 2; } jumpsTaken++; } System.out.println(jumpsTaken); System.out.println(operations.toString()); } 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(); } }