def analyzeMap(map, value, list=[]):
    """
        Analyze a map of interactions to determine the overall
        connectivity.

        Parameters
            map   : A dictionary of lists which contain the connections
                    to the key (dictionary)
            value : The key value to analyze (variable)

        Returns
            list  : A connectivity list of the map (list)

        Example
            Given map {1: [2], 4: [5], 7: [5,9], 9: [14]} list will return
               For 1:  [1,2]
               For 4,5,7,9,14: [4,5,7,9,14]
               For all other X: [X]
    """
    
    if value in list:
        return []
    else:
        list.append(value)
        
    if value in map:
        for entry in map[value]:
            newlist = analyzeMap(map, entry, list)
            for newitem in newlist:
                if newitem not in list:
                    list.append(newitem)
                    
    for key in map:
        for entry in map[key]:
            if entry == value and key not in list:
                newlist = analyzeMap(map, key, list)
                for newitem in newlist:
                    if newitem not in list:
                        list.append(newitem)
    return list