private boolean search(char[][] board, int pos) {
            while (pos < 81) {
                if (board[pos / 9][pos % 9] == '.') {
                    break;
                }
                pos++;
            }
            if (pos == 81) {
                return true;
            }
            int row = pos / 9;
            int column = pos % 9;
            for (char c = '1'; c <= '9'; c++) {
                if (isValid(board, row, column, c)) {
                    board[row][column] = c;
                    if (search(board, pos + 1)) {
                        return true;
                    }
                }
            }
            board[row][column] = '.';
            return false;
        }