import java.util.*; import java.io.*; import java.math.*; public class Solution { static BufferedReader in; static StringTokenizer stk; static int T, N, M, K; static PrintWriter out; public static void main(String[] args) throws Exception { out = new PrintWriter(new OutputStreamWriter(System.out)); boolean oj = System.getProperty("TESTING_IN_ECHELON") != null; if (oj) { in = new BufferedReader(new FileReader("src/in.txt")); } else { in = new BufferedReader(new InputStreamReader(System.in)); } // Start of User Code //for (int i = 0; i < T; i++) { proc(); //} // End of User Code out.flush(); in.close(); } static void proc() throws Exception { String[] moveS = {"UL", "UR", "R", "LR", "LL", "L"}; int[][] moves = {{-2, -1}, {-2, 1}, {0, 2}, {2, 1}, {2, -1}, {0, -2}}; Queue q = new LinkedList(); int n = ni(); int sr = ni(); int sc = ni(); int tr = ni(); int tc = ni(); boolean[][] board = new boolean[n][n]; Point[][] move = new Point[n][n]; q.add(new Point(sr, sc, -1)); board[sr][sc] = true; while (!q.isEmpty()) { Point p = q.poll(); for (int i = 0; i < moves.length; i++) { int[] m = moves[i]; int ttr = p.r + m[0]; int ttc = p.c + m[1]; if (ttr >= 0 && ttc >= 0 && ttr < n && ttc < n && !board[ttr][ttc]) { Point pp = new Point(ttr, ttc, i); q.add(pp); board[ttr][ttc] = true; move[ttr][ttc] = pp; } } } Stack stack = new Stack(); while (tr != sr || tc != sc) { if(move[tr][tc]== null){ break; } stack.push(move[tr][tc]); int ttr =tr - moves[move[tr][tc].move][0]; int ttc =tc - moves[move[tr][tc].move][1]; tr = ttr; tc = ttc; } if (stack.isEmpty()) { System.out.println("Impossible"); } else { System.out.println(stack.size()); System.out.print(moveS[stack.pop().move]); while (!stack.isEmpty()) { System.out.print(" " + moveS[stack.pop().move]); } System.out.println(""); } } static class Point { int r, c; int move; public Point(int r, int c, int move) { this.r = r; this.c = c; this.move = move; } @Override public String toString() { return this.r + " " + this.c; } } static long modPow(long n, long pow, long mod) { return BigInteger.valueOf(n).modPow(BigInteger.valueOf(pow), BigInteger.valueOf(mod)).longValue(); } static long modInv(long n, long mod, boolean isPrimeModuli) { if (isPrimeModuli) { return modPow(n, mod - 2, mod); } return BigInteger.valueOf(n).modInverse(BigInteger.valueOf(mod)).longValue(); } // calc factorials static long[] fact; static void calcFactorials(int n) { fact = new long[n + 1]; fact[0] = 1; for (int i = 1; i <= n; i++) { fact[i] = fact[i - 1] * i; } } static void calcFactorialsModM(int n, long M) { fact = new long[n + 1]; fact[0] = 1; for (int i = 1; i <= n; i++) { fact[i] = fact[i - 1] * i; fact[i] %= M; } } static long ncr(int n, int r) { return fact[n] / (fact[n - r] * fact[r]); } static long ncrModM(int n, int r, long MOD, boolean isPrimeModuli) { return (((fact[n] * modInv(fact[n - r], MOD, isPrimeModuli)) % MOD) * modInv(fact[r], MOD, isPrimeModuli)) % MOD; } static long toL(String s) { return Long.parseLong(s); } static long toL(BigInteger n) { return n.longValue(); } static int toI(String s) { return Integer.parseInt(s); } static double toD(String s) { return Double.parseDouble(s); } static void printf(String format, Object... args) { out.printf(format, args); } static int ni() throws Exception { while (stk == null || !stk.hasMoreTokens()) { stk = new StringTokenizer(in.readLine()); } return Integer.parseInt(stk.nextToken()); } static long nl() throws Exception { while (stk == null || !stk.hasMoreTokens()) { stk = new StringTokenizer(in.readLine()); } return Long.parseLong(stk.nextToken()); } static double nd() throws Exception { while (stk == null || !stk.hasMoreTokens()) { stk = new StringTokenizer(in.readLine()); } return Double.parseDouble(stk.nextToken()); } static String ns() throws Exception { while (stk == null || !stk.hasMoreTokens()) { stk = new StringTokenizer(in.readLine()); } return stk.nextToken(); } static int min(int a, int b) { return a < b ? a : b; } static int max(int a, int b) { return a > b ? a : b; } static long min(long a, long b) { return a < b ? a : b; } static long max(long a, long b) { return a > b ? a : b; } static int gcd(int a, int b) { if (b == 0) { return a; } return gcd(b, a % b); } static long gcd(long a, long b) { if (b == 0) { return a; } return gcd(b, a % b); } }