How to find a parent ahead of you on the path

How to find a parent ahead of you on the path