I want to create a Prufer sequence from a arbitrary degree distribution and with this create a tree. How can I do that?