import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int count =Integer.MAX_VALUE; static String ans=""; 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,"",0,new boolean[n][n]); if(count==Integer.MAX_VALUE) System.out.println("Impossible"); else { System.out.println(count); System.out.println(ans); } in.close(); } public static void printShortestPath(int n,int i,int j,int ei,int ej,String str,int ct,boolean[][] board) { if(i==ei && j==ej) { if(count>ct) { count=ct; ans=str; } return; } if(i > n-1 || j>n-1|| i<0|| j<0) return; board[i][j]=true; if(i-2>=0&&j-1>=0) { if(!board[i-2][j-1]) { board[i-2][j-1]=true; printShortestPath(n, i-2, j-1, ei, ej, str+"UL ", ct+1, board); board[i-2][j-1]=false; } } if(i-2>=0&&j+1=0) { if(!board[i+2][j-1]) { board[i+2][j-1]=true; printShortestPath(n, i+2, j-1, ei, ej, str+"LL ", ct+1, board); board[i+2][j-1]=false; } } if(j-2>=0) { if(!board[i][j-2]) { board[i][j-2]=true; printShortestPath(n, i, j-2, ei, ej, str+"L ", ct+1, board); board[i][j-2]=false; } } } }