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 cont = true; if (i_start%2 != i_end%2){ // start and end must both be on same %2 row cont = false; System.out.println("Impossible"); } if (Math.abs(j_end - j_start)%2 != (Math.abs(i_end - i_start)/2%2)){ // start and end can only be on different %2 column if odd number of row jumps cont = false; System.out.println("Impossible"); } if (cont){ ArrayList path = new ArrayList(); int i_curr = i_start; int j_curr = j_start; while (!(i_curr == i_end && j_curr == j_end)){ // loop if i_curr != i_end or j_curr != j_end if (i_end < i_curr){ i_curr -= 2; if (j_end <= j_curr && j_curr > 0){ j_curr -= 1; path.add("UL"); } else { j_curr += 1; path.add ("UR"); } } else if (i_end == i_curr){ if (j_end < j_curr){ j_curr -= 2; path.add("L"); } else { j_curr += 2; path.add("R"); } } else { i_curr += 2; if (j_end >= j_curr && j_curr < n-1){ j_curr += 1; path.add("LR"); } else { j_curr -= 1; path.add("LL"); } } } // print path count and path String pathString = path.toString().replaceAll("[\\[\\]\\,]",""); System.out.print(path.size() + "\n" + pathString); } } 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(); } }