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) { ArrayList list=new ArrayList(); int x=j_start; int y=i_start; int xf=j_end,yf=i_end; int flag=0; int c=0; int p=0; while(true) { if((x+1==xf&&y+1==yf)||(x+1==xf&&y==yf)||(x+1==xf&&y-1==yf)||(x==xf&&y+1==yf)||(x==xf&&y-1==yf)||(x-1==xf&&y-1==yf)||(x-1==xf&&y==yf)||(x-1==xf&&y+1==yf)) { //Impossible flag=1; break; } else if(x<0 || y<0 || x>=n || y>=n) { flag=1; break; } else if(xf=0 && y-2>=0) { //UL x--; y-=2; list.add("UL"); c++; } else if(xf>x && yf=0) { //UR x++; y-=2; list.add("UR"); c++; } else if(xf>x && yf==y && x+2x && yf>y && x+1y && x-1>=0 && y+2=0) { //L x-=2; list.add("L"); c++; } else if(xf==x && yf=0) { if(x-1>=0)//Up UL {y-=2; x--; list.add("UL");} else {// UR y-=2; x++; list.add("UR"); } c++; } else if(xf==x && yf>y && y+2n) { flag=1; break; } } if(flag==0){ Iterator it=list.iterator(); System.out.println(c); while(it.hasNext()){ System.out.print(it.next() + " "); } } else { System.out.println("Impossible"); } } 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(); } }