public static int printOptimal(int[][] root,int i ,int j ){
		if(1==i&&(root[0].length-1) == j){
			System.out.println("K"+root[i][j]);
		}
		if(i == j) {
			System.out.println("d"+(i-1)+"K"+i+"");
			System.out.println("d"+i+"K"+i+"Һ");
		}
		if (i==j+1) {
			System.out.println("d"+j+"K"+j+"Һ");
		}
		if(i<j){
			System.out.println("K"+root[i][root[i][j]-1]+"K"+root[i][j]+"");
			printOptimal(root, i, root[i][j]-1);
			System.out.println("K"+root[root[i][j]+1][j]+"K"+root[i][j]+"Һ");
			printOptimal(root, root[i][j]+1,j);
			System.out.println();
		}
		return 0;
	}