private static void output(int array[][]) {
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array.length; j++) {
                System.out.print(Integer.toString(array[i][j]) + " ");
            }
            System.out.println();
        }
    }