weighted tree

Input interpretation

weighted tree