import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int[] rMove = {-2,-2,0,2,2,0}; static int[] cMove = {-1,1,2,1,-1,-2}; static String[] moveName = {"UL","UR","R","LR","LL","L"}; static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { boolean[][] visited = new boolean[n][n]; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ visited[i][j]=false; } } List finalResult = new ArrayList<>(); List itmRes = new ArrayList<>(); shortestPathUtil(visited,n,i_start,j_start,i_end,j_end,0,itmRes,finalResult); if(finalResult.isEmpty()){ System.out.println("Impossible"); }else{ System.out.println(finalResult.size()); for(String step:finalResult){ System.out.print(step+" "); } } } static void shortestPathUtil(boolean[][] visited,int n, int i_start, int j_start, int i_end, int j_end, int idx, List itmRes, List finalResult){ if(i_start==i_end&&j_start==j_end){ if(finalResult.isEmpty()||finalResult.size()>itmRes.size()){ finalResult.clear(); finalResult.addAll(itmRes); } return; } if(!finalResult.isEmpty()&&finalResult.size()<=itmRes.size()){ return; } //System.out.println(itmRes); visited[i_start][j_start]=true; for(int move= 0; move<6;move++){ if(isSafe(n,i_start+rMove[move],j_start+cMove[move],visited)){ itmRes.add(moveName[move]); shortestPathUtil(visited,n,i_start+rMove[move],j_start+cMove[move],i_end,j_end,idx+1,itmRes,finalResult); itmRes.remove(idx); } } visited[i_start][j_start] = false; } static boolean isSafe(int n,int i_end, int j_end,boolean[][] visited){ if(i_end>=n||j_end>=n||i_end<0||j_end<0) return false; if(visited[i_end][j_end]) return false; 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(); } }