private boolean isValid(char[][] board, int row, int column, char c) {
            int cellRow = row - row % 3;
            int cellColumn = column - column % 3;
            for (int i = 0; i < 9; i++) {
                if (board[i][column] == c || board[row][i] == c
                        || board[cellRow + i / 3][cellColumn + i % 3] == c) {
                    return false;
                }
            }
            return true;
        }