def get_kids(dic, resource, current):
    """
    Function to get iteratively all kids regarding a parent agency.
    Input:
        - dic: Dictionary with the hierarchy of the agencies in the form of
               dic[parent_agency]=[child1, child2, ..., childN]
        - resource: String, the name of the parent agency
        - current: [], empty list to gather all kids
    Output:
        - List, containing the parent and all the children agencies, if any
    """

    # Update the children list with the current agency
    current.append(resource)
    # If a leaf or no kids return
    if not(resource) in dic:
        pass
    else:
        # For each child agency
        for kid in dic[resource]:
            # Iteratively get their children as well
            current.extend(get_kids(dic, kid, current))
    return sorted(list(set(current)))