public static int[][] mul(int[][] a, int[][] b) {
        int[][] result = new int[a.length][b.length];
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a.length; j++) {
                result[i][j] = 0;
                for (int N = 0; N < a.length; N++) {
                    result[i][j] += a[i][N] * b[N][j];
                }
            }
        }
        return result;
}