public static void printMatrix(Object[][] matrix){
for (int i = 0; i < matrix.lenght ; i++) {
for (int j = 0; j < matrix.lenght; j++) {
System.out.print(matrix[i][j] + " ");
}
System.out.println();
}
}