import java.io.*; import java.util.*; import java.text.*; public class Solution { BufferedReader in; PrintWriter ob; StringTokenizer st; int flag = 0 , ans = Integer.MAX_VALUE; boolean vis[][]; int ok[] = new int[1000]; int res[] = new int[1000]; int index = 0; void printShortestPath(int n, int i, int j, int endi, int endj , int cnt) { if(i<0 || i>=n || j<0 || j>=n || vis[i][j]) return ; if(i==endi && j==endj) { flag = 1; if(cnt < ans) { ans = cnt; for(int p=0 ; p ans) return; vis[i][j] = true; int dx [] = {-2 , -2 , +0 , +2 , +2 , +0}; int dy [] = {-1 , +1 , +2 , +1 , -1 , -2}; for(int k = 0 ; k