from typing import Iterable


def duplicated(lst: Iterable) -> set:
    """Find which items are duplicated in a list/set/tuple (does not keep order)

    Args:
        lst: Iterable with items to check

    Returns:
        Set: set with items repeated (unique)

    Examples:
        >>> a = [1, 2, 3, 1, 4, 5, 2]
        >>> duplicated(a)
        {1, 2}
    """
    seen = set()
    return set(x for x in lst if x in seen or seen.add(x))