def draw_dendrogram(root):
    """
    Manually draw a dendrogram of the tree from root
    """
    from anytree import Node, RenderTree
    queue = []
    queue.append(root)
    while queue:
        newNode = queue.pop(0)
        ind = 'D' + str(newNode.index)
        par = 'D' + str(newNode.parent)
        if newNode.parent == None:
            exec(ind + ' = Node("' + ind + '")')
        else:
            exec(ind + ' = Node("' + ind + '", parent=' + par + ')')
        if newNode.l != None:
            queue.append(newNode.l)
        if newNode.r != None:
            queue.append(newNode.r)
    exec('print(RenderTree(' + 'D' + str(root.index) + '))')
    return
