A tree with n nodes numbered from 1 to n is represented by
the parent array t, where t[i] is the parent of node i, and
t[i] = 0 means that node i is the root of the tree.
Two nodes x and y are also read (not necessarily distinct). Print
the lowest common ancestor of x and y: the deepest node that
appears on both the path from x to the root and the path from y
to the root.
Convention: a node is its own ancestor. If x = y, the answer is x.
If x is an ancestor of y, the answer is x.