Prufer Code Generator

Generate the Prufer code for a given tree by specifying its nodes and edges.

Extra information about Prufer codes: Wikipedia.

Enter a positive integer (n ≥ 2).

Result: