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)throws Exception{ int val=(int)Math.abs((i_start-i_end)%4); int val2=(int)Math.abs((j_start-j_end)%2); switch(val){ case 0: if(val2==1){ System.out.println("Impossible"); return; } break; case 1: System.out.println("Impossible"); return; case 2: if(val2==0){ System.out.println("Impossible"); return; } break; case 3: System.out.println("Impossible"); return; } ArrayDeque q=new ArrayDeque(); boolean matrix[][]=new boolean[n][n]; Point start=new Point(i_start,j_start,null,0); Point end=new Point(i_end,j_end,null,0); q.add(start); matrix[i_start][j_start]=true; while(q.size()!=0){ Point x=q.poll(); if(x.i-2>=0&&x.j-1>=0&&!matrix[x.i-2][x.j-1]){ Point y=new Point(x.i-2,x.j-1,x,x.dist+1); if(y.equals(end)) display(y); q.add(y); matrix[x.i-2][x.j-1]=true; } if(x.i-2>=0&&x.j+1=0&&!matrix[x.i+2][x.j-1]){ Point y=new Point(x.i+2,x.j-1,x,x.dist+1); if(y.equals(end)) display(y); q.add(y); matrix[x.i+2][x.j-1]=true; } if(x.j-2>=0&&!matrix[x.i][x.j-2]){ Point y=new Point(x.i,x.j-2,x,x.dist+1); if(y.equals(end)) display(y); q.add(y); matrix[x.i][x.j-2]=true; } } throw new Exception(); } static void display(Point v){ String arr[]=new String[v.dist]; int i=0; System.out.println(v.dist); while(v.prev!=null){ int sum=v.prev.i-v.i+v.prev.j-v.j; if(sum==3) arr[i++]="UL"; else if(sum==1) arr[i++]="UR"; else if(sum==-2) arr[i++]="R"; else if(sum==-3) arr[i++]="LR"; else if(sum==-1) arr[i++]="LL"; else arr[i++]="L"; v=v.prev; } while(i-->0){ System.out.print(arr[i]+" "); } System.out.println(); System.exit(0); } public static void main(String[] args)throws Exception{ 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(); } } class Point{ int i,j,dist; Point prev; public Point(int i,int j,Point prev,int dist){ this.i=i; this.j=j; this.prev=prev; this.dist=dist; } public boolean equals(Point x){ return this.i==x.i&&this.j==x.j; } }