def read(rows):
    """Reads the list of rows and returns the sudoku dict.

    The sudoku dict maps an index to a known value. Unknown values are not written.
    Indices go from 0 to 80.
    """
    sudoku = {}
    i = 0
    for rn, row in enumerate(rows):
        if rn in (3, 7):
            continue
        j = 0
        for cn, c in enumerate(row.rstrip()):
            if cn in (3, 7):
                continue
            if c != ".":
                sudoku[i * 9 + j] = int(c)
            j += 1
        i += 1

    return sudoku