import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static String result = ""; static int count = 0; static void check (int x, int y, int x_end, int y_end) { if (x > x_end) { if (y >= y_end) { result+="UL "; count++; check(x - 2, y - 1, x_end, y_end); } else { result+="UR "; count++; check(x - 2, y + 1, x_end, y_end); } } else if (y <= y_end) { if ((y < y_end) && (x == x_end)) { result+="R "; count++; check(x, y + 2, x_end, y_end); } else if (x < x_end) { result+="LR "; count++; check(x + 2, y + 1, x_end, y_end); } } else if (y > y_end){ if (x < x_end) { result+="LL "; count++; check(x + 2, y - 1, x_end, y_end); } else { result+="L "; count++; check(x, y - 2, x_end, y_end); } } } static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { // Print the distance along with the sequence of moves. if (((i_start + i_end) % 2 == 0) && ((j_start + j_end + (i_start + i_end) / 2) % 2 == 0)) { check(i_start, j_start, i_end, j_end); System.out.print(count + "\n" + result); } else { System.out.print("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(); } }