from typing import Dict
from typing import Set


def build_dependants(dependencies: Dict[str, Set[str]]) -> Dict[str, Set[str]]:
    """
    Given a dependencies mapping, return the reversed dependants dictionary.
    """
    dependants = {name: set() for name in dependencies.keys()}
    for child, parents in dependencies.items():
        for parent in parents:
            dependants[parent].add(child)
    return dependants