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. StringBuffer moves = new StringBuffer(""); while(i_start != i_end || j_start != j_end){ boolean didMove = false; if(i_start-2 >= i_end && j_start-1 >= j_end){ //UL i_start -= 2; j_start -= 1; didMove = true; moves.append("UL"); } else if(i_start-2 >= i_end && j_start+1 <= j_end){ //UR i_start -= 2; j_start += 1; didMove = true; moves.append("UR"); } else if(j_start+2 <= j_end){ //R j_start += 2; didMove = true; moves.append("R"); } else if(i_start+2 <= i_end && j_start+1 <= j_end){ //LR i_start += 2; j_start += 1; didMove = true; moves.append("LR"); } else if(i_start+2 <= i_end && j_start-1 >= j_end){ //LL i_start +=2; j_start -=1; didMove = true; moves.append("LL"); } else if(j_start-2 >= j_end){ //L j_start -=2; didMove = true; moves.append("L"); } if(!didMove){ System.out.println("Impossible"); return; } moves.append(" "); } System.out.println(moves.toString().split(" ").length); System.out.println(moves.toString()); } 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(); } }