import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { // Print the distance along with the sequence of moves. boolean[][] vis=new boolean[n][n]; int[] js=new int[]{-1, 1, 2, 1, -1, -2}; int[] is=new int[]{-2, -2, 0, 2, 2, 0}; int c=0; Queue> q=new LinkedList<>(); vis[i_start][j_start]=true; List t=new ArrayList<>(); t.add(new Integer[]{i_start, j_start}); q.add(t); q.add(null); boolean b=false; while(!q.isEmpty()){ t=q.poll(); if(t==null){ if(q.peek()!=null){ c++; q.add(null); } }else{ int s=t.size(); Integer[] ar=t.get(s-1); if(ar[0]==i_end && ar[1]==j_end){ b=true; break; } for(int i=0; i<6; i++){ int ti=ar[0]+is[i], tj=ar[1]+js[i]; if(ti>=0 && ti=0 && tj li=new ArrayList<>(t); li.add(new Integer[]{ti, tj}); q.add(li); vis[ti][tj]=true; } } } } if(!b){ System.out.println("Impossible"); return ; } String[] st=new String[]{"UL", "UR", "R", "LR", "LL", "L"}; System.out.println(c); for(int k=1; k