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. String s=""; int c=0; if(Math.abs(i_end-i_start)%2==1){ System.out.println("Impossible"); } else{ int move =Math.abs(i_end-i_start); move=move/2; if(Math.abs(j_end-j_start)%2!=move%2){ System.out.println("Impossible"); } else{ if((j_end-j_start)==0){ if(i_start==n){ for(int i=0;i0){ if((i_end-i_start)<0) s+="UR "; else s+="LR "; } else{ if((i_end-i_start)<0) s+="UL "; else s+="LL "; } c++; } int x=Math.abs(j_start-j_end)-Math.abs(i_start-i_end)/2; for(int i=0;i0) s+="R "; else s+="L "; c++; } } } } System.out.println(c); System.out.println(s); } 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(); } }