import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static Map map= new HashMap<>(); static Map dir_map= new HashMap<>(); static void printShortestPath(int n, int j_start, int i_start, int j_end, int i_end) { // Print the distance along with the sequence of moves. int[][] visited= new int[n][n]; int[][] visited1=new int[n][n]; int[][] dir= {{-1,-2},{1,-2},{2,0},{1,2},{-1,2},{-2,0}}; dir_map.put("-1 -2","UL"); dir_map.put("1 -2","UR"); dir_map.put("2 0","R"); dir_map.put("1 2","LR"); dir_map.put("-1 2","LL"); dir_map.put("-2 0","L"); map.put(i_end+" "+j_end,""); int count=dfs(n,i_start,j_start,i_end,j_end,dir,visited,visited1); if(count==Integer.MAX_VALUE) System.out.println("IMPOSSIBLE"); else{ System.out.println(count); System.out.println(map.get(i_start+" "+j_start).substring(1)); } } static int dfs(int n,int i_start, int j_start, int i_end, int j_end,int[][]dir, int[][] visited,int[][] visited1){ //System.out.println(i_start+" "+j_start); if(i_start==i_end && j_start==j_end) return 0; if(visited[i_start][j_start]>0) return visited[i_start][j_start]; visited1[i_start][j_start]=-1; int min=Integer.MAX_VALUE; String ans1=""; for(int i=0;i<6;i++){ int x=i_start+dir[i][0]; int y=j_start+dir[i][1]; if(x>=n || y>=n || x<0 || y<0 || visited1[x][y]==-1) continue; int temp1=dfs(n,x,y,i_end,j_end,dir,visited,visited1); int temp=temp1!=Integer.MAX_VALUE? temp1+1 : temp1; //System.out.println(x+" "+y+" "+temp); if(temp