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. int count=0; int x1=i_start; int x2=i_end; int y1=j_start; int y2=j_end; String result=new String(); while(x1!=x2||y1!=y2) { if((x2-x1)%2!=0) break; if(x2x1) { x1=x1+2; result=result+"L"; } else if(x1==x2) { if((y2-y1)%2!=0) break; if(y1y2) { y1=y1-2; result=result+"L "; count++; continue; } } if(x1==x2&&y1==y2) { count++; break; } if(y2>=y1) { y1=y1+1; result=result+"R "; } else if(y2<=y1) { y1=y1-1; result=result+"L "; } if(x1>=n||x1<0||y1>=n||y1<0) break; count++; } if(x1!=x2||y1!=y2) result="Impossible"; else System.out.println(count); System.out.println(result); } 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(); } }