Returns all nodes having a path to source in G.
source
G
A directed graph
The ancestors of source in G