Added method to print the branches.