import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static Stack S=new Stack(); static Stack S1; static boolean mat[][]; static int size=40000; static void printShortestPath(int n, int i, int j, int i_end, int j_end) { // Print the distance along with the sequence of moves. if(i==i_end && j==j_end) { if(S.size()(); S1.addAll(S); } mat[i][j]=false;S.pop();return;} if((i-2)>=0 && (j-1)>=0&&mat[i-2][j-1]==false&&(!(S.peek().equals("LR")))) {S.push("UL"); mat[i-2][j-1]=true; printShortestPath(n,i-2,j-1,i_end,j_end); } if((i-2)>=0 && (j+1)=0&&mat[i+2][j-1]==false&&(!(S.peek().equals("UR")))) {S.push("LL"); mat[i+2][j-1]=true; printShortestPath(n,i+2,j-1,i_end,j_end); } if((j-2)>=0&&mat[i][j-2]==false&&(!(S.peek().equals("U")))) {S.push("L"); mat[i][j-2]=true; printShortestPath(n,i,j-2,i_end,j_end); } if(S.peek()=="Start"){ if(S1==null) {System.out.println("Impossible");return;} else {boolean flag=false; System.out.println(size-1); for(String a:S1) { if(flag) System.out.print(a+" "); flag=true; } } } else {mat[i][j]=false;S.pop();} } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); mat=new boolean [n][n]; int i_start = in.nextInt(); int j_start = in.nextInt(); int i_end = in.nextInt(); int j_end = in.nextInt(); S.push("Start"); mat[i_start][j_start]=true; printShortestPath(n, i_start, j_start, i_end, j_end); in.close(); } }