import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Main { static ArrayList result = null; static ArrayList temp = new ArrayList(); 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. printUtil(n,i_start,j_start,i_end,j_end); if(result == null) { System.out.println("Impossible"); } else { System.out.println(result.size()); for(String s: result) { System.out.print(s+" "); } System.out.println(); } } static void printUtil(int n, int x_src, int y_src, int x_dest, int y_dest) { if(temp.size() > n) { return; } if(x_src == x_dest && y_src == y_dest) { if(result == null || temp.size() < result.size()) { result = new ArrayList(temp); } return; } for(int i=1;i<=6;i++) { if(x_dest > x_src && (i==1 || i==2)) { continue; } else if(x_dest < x_src && (i==4 || i==5)) { continue; } else if(y_dest > y_src && i==6) { continue; } else if(y_dest < y_src && i==3) { continue; } if(x_dest-x_src > 6 && y_dest-y_src > 6 && i!=1) { continue; } else if(x_dest-x_src < -6 && y_dest-y_src < -6 && i!=4) { continue; } if(i==1) { if(x_src-2 >=0 && y_src-1>=0) { temp.add("UL"); printUtil(n,x_src-2,y_src-1,x_dest,y_dest); temp.remove(temp.size()-1); } } else if(i==2) { if(x_src-2 >=0 && y_src+1=0) { temp.add("LL"); printUtil(n,x_src+2,y_src-1,x_dest,y_dest); temp.remove(temp.size()-1); } } else if(i==6) { if(y_src-2>=0) { temp.add("L"); printUtil(n,x_src,y_src-2,x_dest,y_dest); temp.remove(temp.size()-1); } } } } 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(); } }