import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static Tuple []myarr; 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. int i_diff = i_start - i_end; int j_diff = j_start - j_end; if (i_diff %2==1 || i_diff==j_diff ) { System.out.println("Impossible"); return; } int counter=0; String s=""; while (i_diff>0 && j_diff>=0) { i_diff += myarr[0].y; j_diff += myarr[0].x; s= s+ "UL "; counter++; } while (i_diff>0 && j_diff<=0) { i_diff += myarr[1].y; j_diff += myarr[1].x; s= s+ "UR "; counter++; } while (j_diff<0) { j_diff += myarr[2].x; s= s+ "R "; counter++; } while(i_diff<0 && j_diff<=0 ) { j_diff += myarr[3].x; i_diff += myarr[3].y; s= s+ "LR "; counter++; } while (i_diff<0 && j_diff>=0) { i_diff += myarr[4].y; j_diff += myarr[4].x; s= s+ "LL "; counter++; } while (j_diff>0) { j_diff += myarr[5].x; s= s+ "L "; counter++; } System.out.println(counter); System.out.println(s); } 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(); myarr = new Tuple [6]; myarr[0] = new Tuple(-1,-2); // UL myarr[1] = new Tuple(1,-2); // UR myarr[2] = new Tuple(2,0); // R myarr[3] = new Tuple(1,2); // LR myarr[4] = new Tuple(-1,2); // LL myarr[5] = new Tuple(-2,0); //L printShortestPath(n, i_start, j_start, i_end, j_end); in.close(); } } class Tuple { public int x; public int y; public Tuple(int x, int y) { this.x = x; this.y = y; } }