def create_index_dict(board):
    """
    Creates a dictionary from values to indices
    """
    index_dict = {}
    for i, row in enumerate(board):
        for j, elem in enumerate(row):
            if elem not in index_dict:
                index_dict[elem] = (i, j)
    return index_dict