Given the root of a binary search tree and two values `p` and `q` that both exist in it, return the value of their lowest common ancestor (the deepest node that has both in its subtree).