import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.util.Arrays; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author - aman_robotics(Aman kumar Singh) * @Institution - Kalyani Government Enginnering College. */ class cheffb { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { boolean flag=false; StringBuffer str=new StringBuffer(); int p=0,q=0,r=0,s=0; int count=0; while(true){ int x=Math.abs(i_start-i_end); int y=Math.abs(j_start-j_end); p=i_start; q=j_start; //System.out.println(p+" "+q+" "+x+" "+y); if((i_start==i_end)&&(j_start==j_end)) break; else if(((p-2)>=0)&&((q-1)>=0)&&(Math.abs(i_end-p+2)<=x)&&(Math.abs(j_end-q+1)<=y)){ i_start-=2; j_start-=1; count++; str.append("UL "); //y=Math.abs(j_start-j_end); //System.out.println(str+" "+i_start+" "+j_start+" "+y); } else if(((p-2)>=0)&&((q+1)=0)&&(Math.abs(i_end-p-2)<=x)&&(Math.abs(j_end-q+1)<=y)){ i_start+=2; j_start-=1; count++; str.append("LL "); //System.out.println(str); } else if(((q-2)>=0)&&(Math.abs(j_end-q+2)<=y)){ j_start-=2; count++; str.append("L "); //System.out.println(str); } else{ flag=true; break; } } if(!flag){ System.out.println(count); System.out.println(str); } else System.out.println("Impossible"); } public static void main(String [] args)throws IOException { FastReader in=new FastReader(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); } static class FastReader{ byte[] buf = new byte[2048]; int index, total; InputStream in; FastReader(InputStream is) { in = is; } int scan() throws IOException { if (index >= total) { index = 0; total = in.read(buf); if (total <= 0) { return -1; } } return buf[index++]; } String next() throws IOException { int c; for (c = scan(); c <= 32; c = scan()); StringBuilder sb = new StringBuilder(); for (; c > 32; c = scan()) { sb.append((char) c); } return sb.toString(); } int nextInt() throws IOException { int c, val = 0; for (c = scan(); c <= 32; c = scan()); boolean neg = c == '-'; if (c == '-' || c == '+') { c = scan(); } for (; c >= '0' && c <= '9'; c = scan()) { val = (val << 3) + (val << 1) + (c & 15); } return neg ? -val : val; } long nextLong() throws IOException { int c; long val = 0; for (c = scan(); c <= 32; c = scan()); boolean neg = c == '-'; if (c == '-' || c == '+') { c = scan(); } for (; c >= '0' && c <= '9'; c = scan()) { val = (val << 3) + (val << 1) + (c & 15); } return neg ? -val : val; } } }