A binary search tree (BST) is built from an empty tree by inserting the given keys one at a time, in the order they appear (go left for smaller keys, right for larger, dropping the key at the first empty spot). All keys are distinct.\n\nGiven two keys a and b that are both present in the tree, report the key stored at their lowest common ancestor (LCA): the deepest node that has both a and b in its subtree (a node is considered an ancestor of itself).\n\n## Input format\n\nLine 1: an integer n.\nLine 2: n distinct space-separated integers giving the insertion order.\nLine 3: two integers a and b, each guaranteed to be one of the inserted keys.\n\n## Output format\n\nA single integer: the key at the lowest common ancestor of a and b.\n\n## Constraints\n\n- 2 <= n <= 100000\n- -1000000000 <= each key <= 1000000000, and all keys are distinct.\n- a and b are distinct and both appear among the inserted keys.