routine vine-to-tree(root,size)