import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int[] rows = {-2,-2,0,2,2,0}; public static int[] cols = {-1, 1, 2, 1, -1, -2}; public static String[] paths = {"UL", "UR", "R", "LR", "LL", "L"}; public static boolean[][] isVisited; static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { isVisited = new boolean[n][n]; dfs(i_start, j_start, n, "", 0, i_end, j_end); if(res == Integer.MAX_VALUE){ System.out.println("Impossible"); }else{ System.out.println(res); System.out.println(pres.trim()); } } public static int res = Integer.MAX_VALUE; public static String pres = ""; public static void dfs(int s, int e, int n, String path, int ans, int ds, int de){ if(s == ds && e == de){ if(res > ans){ res = ans; pres = path; } return; } for (int i = 0; i < 6; i++) { int newr = s + rows[i]; int newc = e + cols[i]; if (isValid(newr, newc, n)) { isVisited[newr][newc] = true; dfs(newr, newc, n, path + " " + paths[i], ans + 1, ds, de); isVisited[newr][newc] = false; } } } public static boolean isValid(int r, int c, int n){ if(r < 0 || c < 0 || r >= n || c >= n || isVisited[r][c]){ return false; }else{ return true; } } 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(); } }