Binary tree is given. Find the sum of values in all its nodes.
Definition of a tree:
Implement function Sum that returns the sum of values of all nodes in the tree.
Function Sum returns value 45 - the sum 1 + 2 + 3 + 4 + 9 + 10 + 16 = 45.