def find_root(tower):
    """
    Every program in the tower lists its dependents.
    Look at the list and determine which program wasn't listed
    as dependent. That's the root.
    """
    # Sublime's syntax highlighter complains about one of these parens.
    # I've no idea why...
    deps = {
        dep for (prog, (weight, holding)) in tower.items()
            for dep in holding
    }
    for (prog, (weight, holding)) in tower.items():
        if prog not in deps:
            return prog