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. boolean isImpossible = false; String result = ""; int count = 0; while((i_start >=0 && j_start>=0) && !isImpossible && i_start<=n && j_start<=n && (i_start!=i_end || j_start!=j_end)) { if(i_start==i_end) { if(Math.abs(j_start-j_end)% 2!=0) { result = "Impossible"; isImpossible = true; } else if(j_start < j_end && Math.abs(j_start-j_end)>=2) { result += "R "; j_start += 2; count++; } else if(j_start > j_end && Math.abs(j_start-j_end)>=2) { result += "L "; j_start -= 2; count++; } } else { if((Math.abs(i_start-i_end)>0 && Math.abs(i_start-i_end)%2!=0) && (Math.abs(j_start-j_end)>0 && Math.abs(j_start-j_end)%2==0)) { result = "Impossible"; isImpossible = true; } else if(i_start >= i_end && j_start >= j_end) { //UL result += "UL "; i_start -= 2; j_start -=1; count++; } else if(i_start >= i_end && j_start <= j_end) { //UR result += "UR "; i_start -= 2; j_start +=1; count++; } else if(i_start <= i_end && j_start <= j_end) { //LR result += "LR "; i_start += 2; j_start +=1; count++; } else if(i_start <= i_end && j_start >= j_end) { //LL result += "LL "; i_start += 2; j_start -=1; count++; } } } if(!isImpossible) { 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(); } }