import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static String printShortestPath(int n, int row_start, int col_start, int row_end, int col_end) { // Print the distance along with the sequence of moves. if (Math.abs(row_start - row_end) % 2 == 1) { return "Impossible"; } if (col_start - col_end == 0 && Math.abs(row_start - row_end) % 4 > 0) { return "Impossible"; } if (Math.abs(col_start - col_end) < 1 && Math.abs(row_start - row_end) < 1) { return "Impossible"; } int countMoves = 0; StringBuilder moves = new StringBuilder(); while (row_start != row_end || col_start != col_end) { System.err.println("we are here " + row_start + " " + col_start); if (row_start > row_end) { // we have to go UP row_start -= 2; countMoves++; if (col_start > col_end) { // we have to go LEFT col_start -= 1; moves.append("UL "); } else { // we have to go RIGHT col_start += 1; moves.append("UR "); } } else if (row_start == row_end) { // we are on the same row if (Math.abs(col_start - col_end) % 2 == 0) { int steps = (col_end - col_start) / 2; if (steps > 0) { for (int s = 0; s < steps; s++) { moves.append("R "); } } else { steps = -steps; for (int s = 0; s < steps; s++) { moves.append("L "); } } countMoves += steps; return countMoves + "\n" + moves.toString().trim(); } else { return "Impossible"; } } else if (row_start < row_end) { // we have to go DOWN or RIGHT int stepsDown = (row_end - row_start) / 2; if (col_start < col_end - stepsDown) { // first go RIGHT col_start += 2; countMoves++; moves.append("R "); } else { row_start += 2; countMoves++; if (col_start <= col_end) { // we have to go RIGHT col_start += 1; moves.append("LR "); } else { // we have to go LEFT col_start -= 1; moves.append("LL "); } } } } return countMoves + "\n" + moves.toString().trim(); } public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { int n = in.nextInt(); int row_start = in.nextInt(); int col_start = in.nextInt(); int row_end = in.nextInt(); int col_end = in.nextInt(); System.out.println(printShortestPath(n, row_start, col_start, row_end, col_end)); } } }