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 count = 0; String a[] = new String[200]; int counter = 0; while (true) { count++; if(i_start >= i_end && j_start >= j_end) { if(i_start - 2 >= 0 && j_start - 1 >=0) { i_start -= 2; j_start -= 1; //System.out.print("UL"+"i_start="+i_start+" "+j_start); //System.out.print("UL "); a[counter]="UL "; counter++; } else if(j_start - 2 >= 0) { j_start -= 2; //System.out.print("L "); a[counter]="L "; counter++; } } else if(i_start >= i_end && j_start <= j_end) { if(i_start - 2 >= 0 && j_start + 1 < n) { i_start -= 2; j_start += 1; //System.out.print("UR "); a[counter]="UR "; counter++; } else if(j_start + 2 < n) { j_start += 2; //System.out.print("R "); a[counter]="R "; counter++; } } else if(i_start <= i_end && j_start <= j_end) { if(i_start + 2 < n && j_start + 1 < n) { i_start += 2; j_start += 1; //System.out.print("LR "); a[counter]="LR "; counter++; } else if (j_start + 2 >= 0) { j_start += 2; //System.out.print("R "); a[counter]="R "; counter++; } } else if(i_start <= i_end && j_start >= j_end) { if(i_start + 2 < n && j_start - 1 >= 0) { i_start += 2; j_start -= 1; //System.out.print("LL "); a[counter]="LL "; counter++; } else if(j_start - 2 >= 0) { j_start -= 2; //System.out.print("L "); a[counter]="L "; counter++; } } if(i_start == i_end && j_start == j_end) { System.out.println(counter); for(int i = 0; i < counter; i++) { System.out.print(a[i]); } break; } else if(count > 3*n) { System.out.print("Impossible"); break; } } } 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(); } }