import java.io.*; import java.util.*; public class Solution { class Info { int i, j, count; String move; List moves; public Info(int i, int j, String m, int c) { this.i = i; this.j = j; this.move = m; this.count = c; this.moves = new ArrayList<>(); } } class Answer { int R, I, J, X, Y; int[][] visited; int[] dx = {-2,-2,0,2,2,0}; int[] dy = {-1,1,2,1,-1,-2}; String[] dn = {"UL", "UR", "R", "LR", "LL", "L"}; public boolean valid(int x, int y) { return ( x >= 0 && x < R && y >= 0 && y < R && visited[x][y] == 0); } public void solve(PrintWriter out) { ArrayDeque queue = new ArrayDeque<>(); queue.addLast( new Info(I, J, "start", 0) ); int min = -1; List ret = new ArrayList<>(); while ( !queue.isEmpty() ) { Info t = queue.pollFirst(); if (t.i == X && t.j == Y) { min = t.count; ret.addAll(t.moves); break; } visited[t.i][t.j] = 1; for (int k = 0; k < 6; k++) { if ( valid(t.i + dx[k], t.j + dy[k]) ) { Info info = new Info(t.i + dx[k], t.j + dy[k], dn[k], t.count+1); info.moves.addAll(t.moves); info.moves.add(dn[k]); queue.addLast(info); } } } if (min == -1) { out.println("Impossible"); return; } out.println(min); for (String l : ret) { out.print(l + " "); } out.println(""); } public void main(FastScanner in, PrintWriter out) { R = in.nextInt(); visited = new int[R][R]; I = in.nextInt(); J = in.nextInt(); X = in.nextInt(); Y = in.nextInt(); solve(out); } public void p(Object o) { System.out.print(o); } public void pl(Object o) { System.out.println(o); } public void arp(int[] o) { pl( Arrays.toString(o) ); } public void arpp(int[][] o) { for (int i = 0; i < o.length; i++) { for (int j = 0; j < o[0].length; j++) { p(o[i][j] + " "); } pl(""); } } public void ck(Object o1, Object o2) { pl(o1 + " " + o2); } public void ckk(Object o1, Object o2, Object o3) { pl(o1 + " " + o2 + " " + o3); } public void ckkk(Object o1, Object o2, Object o3, Object o4) { pl(o1 + " " + o2 + " " + o3 + " " + o4); } } public static void main(String[] args) throws Exception { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastScanner in = new FastScanner(inputStream); PrintWriter out = new PrintWriter(outputStream); Solution problem = new Solution(); Answer ans = problem.new Answer(); ans.main(in, out); out.close(); in.close(); } static class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(InputStream in) { br = new BufferedReader(new InputStreamReader(in)); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } public String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } public void close() throws IOException { br.close(); } } }