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; Stack stk = new Stack(); boolean reached = false; if((i_start-i_end)%2==1){ System.out.println("Impossible"); System.exit(1); } else if((i_start-i_end)==1){ System.out.println("Impossible"); System.exit(1); } else if((i_end-i_start)==1){ System.out.println("Impossible"); System.exit(1); } while(!reached){ if(i_start==i_end && j_start==j_end){ reached=true; } else if(i_start>=2 && j_start>=2 && i_start>i_end && j_start>=j_end){ //ul i_start=i_start-2; j_start=j_start-1; count++; stk.push(1); } else if(i_start>=2 && j_start<=(n-3) && i_start>i_end && j_start<=j_end){ //ur i_start=i_start-2; j_start=j_start+1; count++; stk.push(2); } else if(i_start<=(n-3) && j_start<=(n-2) && i_start=1 && i_start=j_end){ //ll i_start=i_start+2; j_start=j_start-1; count++; stk.push(3); } else if(j_start<=(n-3) && i_start==i_end && (j_end-j_start)%2==1){ reached=true; System.out.println("Impossible"); System.exit(1); } else if(j_start<=(n-3) && i_start==i_end && j_start=2 && i_start==i_end && (j_start-j_end)%2==1 ){ reached=true; System.out.println("Impossible"); System.exit(1); } else if(j_start>=2 && i_start==i_end && j_start>j_end ){ //l j_start=j_start-2; count++; stk.push(6); } else if(count>n){ reached=true; System.out.println("Impossible"); System.exit(1); } else{ reached=true; System.out.println("Impossible"); System.exit(1); } } System.out.println(count); int a=0; int arr[] = new int[100]; while(!stk.empty()){ arr[a]=stk.pop(); a++; } int v=a; for(int i=v-1;i>=0;i--){ switch(arr[i]){ case 1: System.out.print("UL "); break; case 2: System.out.print("UR "); break; case 3: System.out.print("LL "); break; case 4: System.out.print("LR "); break; case 5: System.out.print("R "); break; case 6: System.out.print("L "); 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(); } }