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) { int[][]moves = moves(); int[] currentPlace = {i_start, j_start}; int[] destination = {i_end, j_end}; double distance = calculateDistance(currentPlace, destination); StringBuilder str = new StringBuilder(); int number_moves = 0; while(true) { //System.out.println("Now in " + Arrays.toString(currentPlace)); distance = calculateDistance(currentPlace, destination); double newMinimumDistance = distance; int chosen_move = -1; for (int i = 0; i < 6; i++) { int[] place = currentPlace; place[0] = place[0] + moves[i][0]; place[1] = place[1] + moves[i][1]; double newDistance = calculateDistance(place, destination); boolean isValid = isValidPlace(place[0], place[1], n); if ((newDistance < newMinimumDistance) && isValid ) { newMinimumDistance = newDistance; chosen_move = i; } place[0] = place[0] - moves[i][0]; place[1] = place[1] - moves[i][1]; } str.append(moveName(chosen_move)).append(" "); if (newMinimumDistance == 0) { System.out.println(++number_moves); System.out.println(str.toString()); break; } else if ((newMinimumDistance > distance) || (chosen_move == -1)) { System.out.println("Impossible"); break; } else { number_moves++; currentPlace[0] += moves[chosen_move][0]; currentPlace[1] += moves[chosen_move][1]; } } } static boolean isValidPlace(int i, int j, int n) { if ( (i < 0) || (i >= n) ) { return false; } if ( (j < 0) || (j >= n) ) { return false; } return true; } static double calculateDistance(int[] start, int[] end) { int i_distance = end[0] - start[0]; int j_distance = end[1] -start[1]; double result = (i_distance * i_distance) + (j_distance * j_distance); return Math.sqrt(result); } static int[][] moves() { int[] ul = {-2, -1}; int[] ur = {-2, +1}; int[] r = {0, +2}; int[] lr = {+2, +1}; int[] ll = {+2, -1}; int[] l = {0, -2}; int[][] moves = {ul, ur, r, lr, ll, l}; return moves; } static String moveName(int i) { switch (i) { case 0: return "UL"; case 1: return "UR"; case 2: return "R"; case 3: return "LR"; case 4: return "LL"; case 5: return "L"; } return "ERROR"; } 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(); try { printShortestPath(n, i_start, j_start, i_end, j_end); } catch (Exception e) { System.out.println("Impossible"); } in.close(); } }