private static void printSort(int[][] a) {
        int N = a.length;
        for (int line = 1; line < 2 * N; line++) {
            //
            for (int i = 0; i < N; i++) {
                int j = N + i - line;
                if (j > -1 && j < N ) {
                    if (i == N - 1 || j == N - 1) {
                        System.out.print(a[i][j]);
                        System.out.println("---" + line);
                        break;
                    } else {
                        System.out.print(a[i][j] + ",");
                    }

                }
            }
        }

    }