Find the lowest common ancestor in a binary tree.
Represent each node as [value, left, right], where a missing child is None. Implement lowest_common_ancestor(root, p, q) to return the value of the lowest node that is an ancestor of both target values. All node values are unique, and both targets are guaranteed to exist in the tree.
def lowest_common_ancestor(root, p, q):