import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int getCase(int ic, int jc, int ie, int je){ if(ic == ie){ if(jc < je) return 5; if(jc > je) return 6; } else if(ic > ie){ if(jc < je) return 3; if(jc > je) return 1; if(jc == je) return 7; } else if(ic < ie){ if(jc < je) return 2; if(jc > je) return 4; if(jc == je) return 8; } return 0; /* 1 -> UL 2 -> LR 3 -> UR 4 -> LL 5 -> R 6 -> L 7 -> Not Possible */ } //Class to move the piece class Move{ int[] r = new int[2]; int[] UL(int i,int j){ r[0] = i - 2; r[1] = j - 1; return r; } int[] UR(int i,int j){ r[0] = i - 2; r[1] = j + 1; return r; } int[] LL(int i,int j){ r[0] = i + 2; r[1] = j - 1; return r; } int[] LR(int i,int j){ r[0] = i + 2; r[1] = j + 1; return r; } int[] L(int i,int j){ r[0] = i; r[1] = j - 2; return r; } int[] R(int i,int j){ r[0] = i; r[1] = j + 2; return r; } } static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int ic = i_start, jc = j_start; int[] ij = new int[2]; int case_no; boolean brk = false;//break; String moves = " "; int count = 0; Solution obj = new Solution(); Solution.Move in_obj = obj.new Move(); while(true){ count++; case_no = getCase(ic,jc,i_end,j_end); switch (case_no){ case 0 :{ break; } case 1 :{ moves = moves + "UL "; ij = in_obj.UL(ic,jc); break; } case 2 :{ moves = moves + "LR "; ij = in_obj.LR(ic,jc); break; } case 3 :{ moves = moves + "UR "; ij = in_obj.UR(ic,jc); break; } case 4 :{ moves = moves + "LL "; ij = in_obj.LL(ic,jc); break; } case 5 :{ moves = moves + "R "; ij = in_obj.R(ic,jc); break; } case 6 :{ moves = moves + "L "; ij = in_obj.L(ic,jc); break; } case 7 :{ moves = moves + "UR "; ij = in_obj.UR(ic,jc); break; } case 8 :{ moves = moves + "LR "; ij = in_obj.LR(ic,jc); break; } } ic = ij[0]; jc = ij[1]; if(ic < 0 || jc < 0){ System.out.println("Impossible"); break; } if(ic==i_end && jc==j_end){ System.out.println(count); System.out.println(moves.trim()); break; } } } 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(); } }