def update(d: dict, u: dict):
    """
    Adds u to d
    Where each dict is defaultdict(set)
    """
    if not u:
        return d
    for k, v in u.items():
        if not v:
            continue
        if k not in d:
            d[k] = v
        else:
            d[k] = d[k] | v