def minimal_generalizations_cons(h,d):
    """returns all minimal generalizations of h that are consistent
    with positive example d"""
    generalizations=set()
    mg=[f for f in h]
    for i,f in enumerate(h):
        if f!=d[i]:
            if f!="0":
                mg[i]="?"
            else:
                mg[i]=d[i]
    generalizations.add(tuple(mg))
    return generalizations