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) { // Print the distance along with the sequence of moves. if (Math.abs(i_end - i_start) % 2 == 1) { System.out.println("Impossible"); return; } ArrayList path = new ArrayList(); boolean solved = false; int currentIStart = i_start; int currentJStart = j_start; while (!solved) { if ((currentIStart < i_end)) { if (currentJStart < j_end) { path.add("LR"); currentIStart += 2; currentJStart += 1; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentIStart > i_end) { System.out.println("Impossible"); return; } } else if (currentJStart > j_end) { path.add("LL"); currentIStart += 2; currentJStart -= 1; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentIStart > i_end) { System.out.println("Impossible"); return; } } else { path.add("LR"); currentIStart += 2; currentJStart += 1; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentIStart > i_end) { System.out.println("Impossible"); return; } } } else if (currentIStart > i_end) { if (currentJStart < j_end) { path.add("UR"); currentIStart -= 2; currentJStart += 1; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentIStart < i_end) { System.out.println("Impossible"); return; } } else if (currentJStart > j_end) { path.add("UL"); currentIStart -= 2; currentJStart -= 1; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentIStart < i_end) { System.out.println("Impossible"); return; } } else { path.add("UL"); currentIStart -= 2; currentJStart -= 1; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentIStart < i_end) { System.out.println("Impossible"); return; } } } else { if (currentJStart < j_end) { path.add("R"); currentJStart += 2; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentJStart > j_end) { System.out.println("Impossible"); return; } } else if (currentJStart > j_end) { path.add("L"); currentJStart -= 2; if ((currentIStart == i_end) && (currentJStart == j_end)) { solved = true; } else if (currentJStart < j_end) { System.out.println("Impossible"); return; } } } } System.out.println(path.size()); for (int i = 0; i < path.size() - 1; i++) { System.out.print(path.get(i) + " "); } System.out.println(path.get(path.size() - 1)); } 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(); } }