import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static double dist(int x1, int y1, int x2, int y2) { return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); } static void printShortestPath(int n, int sx, int sy, int dx, int dy) { // Print the distance along with the sequence of moves. // UL, UR, R, LR, LL, L if ((Math.abs(dx - sx) % 2) != 0) { System.out.println("Impossible"); return; } else if ((sx + sy) % 2 == 0) { if (Math.abs(sx - dx) % 4 == 0 && (dx + dy) % 2 != 0) { System.out.println("Impossible"); return; } else if (Math.abs(sx - dx) % 4 != 0 && (dx + dy) % 2 == 0) { System.out.println("Impossible"); return; } } else if ((sx + sy) % 2 != 0) { if (Math.abs(sx - dx) % 4 == 0 && (dx + dy) % 2 == 0) { System.out.println("Impossible"); return; } else if (Math.abs(sx - dx) % 4 != 0 && (dx + dy) % 2 != 0) { System.out.println("Impossible"); return; } } int cx = sx, cy = sy; int[] nx = {-1,-1,-1,-1,-1,-1}; int[] ny = {-1,-1,-1,-1,-1,-1}; int count = 0, ni = -1; double d, tmpD; String steps = ""; String step; while(true) { step = ""; d = 1.5 * n; // L if ((cy - 2) >= 0) { nx[5] = cx; ny[5] = cy - 2; tmpD = dist(nx[5],ny[5], dx, dy); if (tmpD <= d) { d = tmpD; step = "L "; ni = 5; } } // LL if ((cx + 2) < n && (cy - 1) >= 0) { nx[4] = cx + 2; ny[4] = cy - 1; tmpD = dist(nx[4],ny[4], dx, dy); if (tmpD <= d) { d = tmpD; step = "LL "; ni = 4; } } // LR if ((cx + 2) < n && (cy + 1) < n) { nx[3] = cx + 2; ny[3] = cy + 1; tmpD = dist(nx[3],ny[3], dx, dy); if (tmpD <= d) { d = tmpD; step = "LR "; ni = 3; } } // R if ((cy + 2) < n) { nx[2] = cx; ny[2] = cy + 2; tmpD = dist(nx[2],ny[2], dx, dy); if (tmpD <= d) { d = tmpD; step = "R "; ni = 2; } } // UR if ((cx - 2) >= 0 && (cy + 1) < n) { nx[1] = cx - 2; ny[1] = cy + 1; tmpD = dist(nx[1],ny[1], dx, dy); if (tmpD <= d) { d = tmpD; step = "UR "; ni = 1; } } // UL if ((cx - 2) >= 0 && (cy - 1) >= 0) { nx[0] = cx - 2; ny[0] = cy - 1; tmpD = dist(nx[0],ny[0], dx, dy); if (tmpD <= d) { d = tmpD; step = "UL "; ni = 0; } } count++; steps += step; cx = nx[ni]; cy = ny[ni]; if (cx == dx && cy == dy) break; } System.out.println (count); System.out.println (steps.substring(0,steps.length() - 1)); } 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(); } }