Extend paths-to-tree algorithm with paths on leafs