EdgeAncestry function

Ancestors of an edge