def contains_recursive(nl, target):
    """Recursive search for an element in list, sets and tuples."""
    if type(nl) is dict:
        nl = nl.values()
    for thing in nl:
        if type(thing) in (list, set, tuple, dict):
            if contains_recursive(thing, target):
                return True
        if thing == target:
            return True
    return False