import java.util.*; import java.io.*; import java.math.*; import java.lang.*; import java.util.stream.*; /** * @author Ashish */ public class Main implements Runnable{ public int TC = 0; public static void main(String[] args) { new Thread(null, new Main(), ":)", 1L << 26).start(); } static final int oo = 10000000; static int[] dr = new int[]{-2, -2, 0, 2, 2, 0}; static int[] dc = new int[]{-1, 1, 2, 1, -1, -2}; static String[] di = new String[]{"UL", "UR", "R", "LR", "LL", "L"}; @SuppressWarnings("Unchecked") public void solve() throws IOException { int n = ni(); int sr = ni(),sc = ni(), tr = ni(), tc = ni(); int[][][] last = new int[n][n][2]; int[][] dist = new int[n][n]; String[][] direc = new String[n][n]; for(int[] dd : dist) { Arrays.fill(dd, oo); } for(int[][] ll : last) { for(int[] lll : ll) Arrays.fill(lll, -oo); } dist[sr][sc] = 0; last[sr][sc][0] = sr; last[sr][sc][1] = sc; int[] queue = new int[n * n << 1]; int sizeQ = 0; queue[sizeQ++] = sr; queue[sizeQ++] = sc; for(int ptr = 0;ptr < sizeQ; ptr += 2) { int r = queue[ptr]; int c = queue[ptr + 1]; for(int i = 0;i < 6; ++i) { int nr = r + dr[i]; int nc = c + dc[i]; if(nr >= 0 && nr < n && nc >= 0 && nc < n) { if(dist[nr][nc] > dist[r][c] + 1) { dist[nr][nc] = dist[r][c] + 1; last[nr][nc][0] = r; last[nr][nc][1] = c; direc[nr][nc] = di[i]; queue[sizeQ++] = nr; queue[sizeQ++] = nc; } } } } ArrayList ans = new ArrayList<>(); int r = tr; int c = tc; while(r != sr || c != sc) { if(r == -oo && c == -oo) { ans.clear(); break; } ans.add(direc[r][c]); int nr = r; int nc = c; r = last[nr][nc][0]; c = last[nr][nc][1]; } if(ans.size() == 0) { out.println("Impossible"); } else { Collections.reverse(ans); out.println(ans.size()); for(int i = 0;i < ans.size(); ++i) { if(i != 0) out.print(" "); out.print(ans.get(i)); } out.println(); } } BufferedReader br; StringTokenizer st; PrintWriter out; public void run() { try { br = new BufferedReader(new InputStreamReader(System.in),32768); st = null; out = new PrintWriter(System.out); if(TC == 1) { for(int T = ni();T > 0; --T) { solve(); } } else { solve(); } br.close(); out.close(); } catch(IOException e) { e.printStackTrace(); System.exit(1); } } public char[] nsc( ) throws IOException { return ns().toCharArray(); } public char[][] nm(int n, int m) throws IOException { char[][] map = new char[n][]; for(int i = 0;i < n; ++i) { map[i] = nsc(); } return map; } public String ns() throws IOException { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } public String nextLine() throws IOException { return br.readLine(); } public int ni() throws IOException { return Integer.parseInt(ns()); } public int[] na(int n) throws IOException { int[] a = new int[n]; for(int i = 0;i < n; ++i) a[i] = ni(); return a; } public long nl() throws IOException { return Long.parseLong(ns()); } public long[] nal(int n) throws IOException { long[] a = new long[n]; for(int i = 0;i < n; ++i) a[i] = nl(); return a; } public double nd() throws IOException { return Double.parseDouble(ns()); } private static boolean oj = System.getProperty("ONLINE_JUDGE") != null; private static void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); } }