def unique_repr(obj):
    """Return a deterministic representation of the given object.

    >>> unique_repr({'b','a','ab','c'})
    "{'a', 'ab', 'b', 'c'}"
    >>> unique_repr({3: {5,4}, 8: {3,6,0}})
    '{3: {4, 5}, 8: {0, 3, 6}}'

    """
    if isinstance(obj, dict):
        sorted_dict_reprs = sorted(unique_repr(k) + ': ' + unique_repr(v)
                                   for k,v in obj.items())
        return '{' + ', '.join(sorted_dict_reprs) + '}'
    if isinstance(obj, set):
        return '{' + ', '.join(sorted(unique_repr(elem) for elem in obj)) + '}'
    else:
        return repr(obj)