You are given a non-empty special binary tree of non-negative values. Every node has either zero or two children, and when a node has two children its value is the smaller of its two children's values: root.val = min(root.left.val, root.right.val).
Return the second smallest distinct value among all nodes of the tree. If no such value exists, return -1.