Now we can build the tree with tuples.
Adding code to generate prefix codes based on a given tree.
Fixed printing of the prefix codes-