import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { 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(); } public static LinkedList answer; static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int[][] visited=new int[n][n]; for(int c=0;c path=new LinkedList(); answer= new LinkedList(); findpath(i_start,j_start,visited,n,i_end,j_end,path); if(answer.size()==0){ System.out.println("Impossible"); }else{ System.out.println(answer.size()); for(String s5:answer){ System.out.print(s5+" "); } } } public static void findpath(int x,int y,int[][] visited,int n,int vx,int vy,LinkedList path){ if(x==vx && y==vy){ if(answer.size()==0){ answer=path; }else{ if(path.size() path1=new LinkedList(); LinkedList path2=new LinkedList(); LinkedList path3=new LinkedList(); LinkedList path4=new LinkedList(); LinkedList path5=new LinkedList(); LinkedList path6=new LinkedList(); for(String s1:path){ path1.add(s1); path2.add(s1); path3.add(s1); path4.add(s1); path5.add(s1); path6.add(s1); } if(x0){ if(visited[x+2][y-1]==0){ visitedupdate1[x+2][y-1]=1; path1.add("LL"); if(answer.size()==0 || (path1.size()1){ if(y>0){ if(visited[x-2][y-1]==0){ visitedupdate3[x-2][y-1]=1; path3.add("UL"); if(answer.size()==0 || (path3.size()1){ if(visited[x][y-2]==0){ visitedupdate6[x][y-2]=1; path6.add("L"); if(answer.size()==0 || (path6.size()