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. int rowGap = (i_start - i_end) / 2; int colGap = j_start - j_end; if((i_start - i_end) % 2 != 0 || (rowGap+colGap) % 2 != 0) { System.out.println("Impossible"); return; } int minStep = 0; List result = new ArrayList<>(); while(rowGap > 0) { if(colGap >= 0) { result.add("UL"); colGap--; } else { result.add("UR"); colGap++; } rowGap--; minStep++; } while(rowGap < 0) { if(colGap < rowGap) { result.add("R"); colGap += 2; } else if(colGap <= 0) { result.add("LR"); colGap++; } else { result.add("LL"); colGap--; } rowGap++; minStep++; } while(rowGap == 0) { if(colGap < 0) { result.add("R"); colGap += 2; } else if(colGap > 0) { result.add("L"); colGap -= 2; } else { break; } minStep++; } System.out.println(minStep); System.out.print(result.get(0)); for(int i = 1; i < result.size(); i++) System.out.print(" " + result.get(i)); } 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(); } }