import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int n,is,js,ie,je; static ArrayList defal=new ArrayList<>(Collections.nCopies(200, "")); static ArrayList path=new ArrayList<>(); static int[][] a; static boolean isvalid(int i,int j){ if(i>=0 && i=0 && j makepath(int i,int j,String dir){ if(i==ie && j==je){ ArrayList al=new ArrayList<>(); al.add(dir); return al; } a[i][j]=1; PriorityQueue> heap=new PriorityQueue<>((a,b)->a.size()-b.size()); //ArrayList minsizeal=defal; ArrayList ulal=new ArrayList<>(); ArrayList ural=new ArrayList<>(); ArrayList ral=new ArrayList<>(); ArrayList lral=new ArrayList<>(); ArrayList llal=new ArrayList<>(); ArrayList lal=new ArrayList<>(); //System.out.println(defal.size()); if(isvalid(i-2,j-1)){ ulal=makepath(i-2,j-1,"UL"); if(ulal.size()!=0){ ulal.add(dir); //if(ulal.size()(); else return heap.peek(); } static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { ArrayList path=makepath(i_start,j_start,"start"); if(path.size()==0) System.out.println("Impossible"); else{ System.out.println(path.size()-1); for(int i=path.size()-2;i>=0;i--){ System.out.print(path.get(i)+" "); } } } public static void main(String[] args) { Scanner in = new Scanner(System.in); n = in.nextInt(); is = in.nextInt(); js = in.nextInt(); ie = in.nextInt(); je = in.nextInt(); a=new int[n][n]; if(is==ie && js==je) System.out.println("0"); else printShortestPath(n, is, js, ie, je); in.close(); } }