import adt.tree.TreeNode;
public class Q026_Inorder_Successor_in_Binary_Search_Tree {
public static void main(String[] args) {
TreeNode root = Tree.bst2();
TreeNode node = Tree.getTreeNode(root, 8);
TreeNode successor = inOrderSuccessor(root, node);
if (successor == null) {
System.out.println("null");
} else {
System.out.println(successor.val);
}