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. if((i_start - i_end) % 2 != 0 || ((i_start - i_end) / 2 ) % 2 != (j_start - j_end) % 2) { System.out.println("Impossible"); return; } ArrayList steps = new ArrayList(); int i_step = i_start < i_end ? 2 : -2; //move up or down while(i_start != i_end){ if(i_step > 0){ if(j_start <= j_end){ steps.add("LR "); j_start++; }else{ steps.add("LL "); j_start--; } }else{ if(j_start <= j_end){ steps.add("UR "); j_start++; }else{ steps.add("UL "); j_start--; } } i_start += i_step; } //move left or right int j_step = j_start < j_end ? 2 : -2; while (j_start != j_end){ if(j_start <= j_end){ steps.add("R "); j_start+=j_step; }else{ steps.add("L "); j_start+=j_step; } } System.out.println(steps.size()); for(Object step : steps){ System.out.print((String) step); } return; } 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(); } }