Google interview question

Find ancestor in the tree