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. String result=""; int step=0; int sign=i_start-i_end; int sign1=j_start-j_end; if(sign>0&&sign1>0){ while(i_start!=i_end||j_start!=j_end){ if(i_start==i_end&&j_start!=j_end){ if((j_start-j_end)%2==0) { result += "L "; step++; j_start=j_start-2; } else { result = "Impossible"; break; } } else if(i_start!=i_end&&j_start==j_end){ result="Impossible"; break; } else if(i_start==i_end&&j_start!=j_end){ result="Impossible"; break; } else { if((i_start-i_end)%2==0){ result+="UL "; step++; i_start=i_start-2; j_start=j_start-1; } else { result = "Impossible"; break; } } }} if(sign<0&&sign1>0){ while(i_start!=i_end||j_start!=j_end){ if(i_start==i_end&&j_start!=j_end){ if((j_start-j_end)%2==0) { result += "L "; step++; j_start=j_start-2; } else { result = "Impossible"; break; } } else if(i_start!=i_end&&j_start==j_end){ result="Impossible"; break; } else if(i_start==i_end&&j_start!=j_end){ result="Impossible"; break; } else { if((i_start-i_end)%2==0){ result+="LL "; step++; i_start=i_start-2; j_start=j_start-1; } else { result = "Impossible"; break; } } }} if(sign<0&&sign1<0){ while(i_start!=i_end||j_start!=j_end){ if(i_start==i_end&&j_start!=j_end){ if((j_start-j_end)%2==0) { result += "R "; step++; j_start=j_start-2; } else { result = "Impossible"; break; } } else if(i_start!=i_end&&j_start==j_end){ result="Impossible"; break; } else if(i_start==i_end&&j_start!=j_end){ result = "Impossible"; break; } else { if((i_start-i_end)%2==0){ result+="LR "; step++; i_start=i_start-2; j_start=j_start-1; } else { result = "Impossible"; break; } } } } if(sign>0&&sign1<0){ while(i_start!=i_end||j_start!=j_end){ if(i_start==i_end&&j_start!=j_end){ if((j_start-j_end)%2==0) { result += "R "; step++; j_start=j_start-2; } else { result = "Impossible"; break; } } else if(i_start!=i_end&&j_start==j_end){ { result="Impossible"; break; }} else if(i_start==i_end&&j_start!=j_end){ { result="Impossible"; break;} } else { if((i_start-i_end)%2==0){ result+="UR "; step++; i_start=i_start-2; j_start=j_start-1; } else { result = "Impossible"; break; }} }} if(step!=0) System.out.println(step); 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(); } }