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 l= Math.abs(i_start-i_end); if(l%2!=0 ) { System.out.println("Impossible"); return; } if((l/2)%2==0 && Math.abs(j_start-j_end)%2!=0){ System.out.println("Impossible"); return; } if((l/2)%2!=0 && Math.abs(j_start-j_end)%2==0){ System.out.println("Impossible"); return; } int diff=0; String path1="" ,path2="",path3="",path4="",path5="",path6=""; while(true){ if(i_start==i_end && j_start==j_end){ System.out.println(diff); System.out.println(path1+path2+path3+path4+path5+path6); return; } if(i_start>i_end && (j_start>j_end || j_start==j_end )){ path1+="UL "; i_start-=2; j_start-=1; } else if(i_start>i_end && (j_startj_end || j_start==j_end )){ path5+="LL "; i_start+=2; j_start-=1; } else if(i_start==i_end && j_start>j_end){ path6+="L "; j_start-=2; } diff++; } } 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(); } }