You are given a directed acyclic graph with n nodes labelled 0 to n - 1 and a list of edges where edges[i] = [from, to].
Return a list where entry i holds all ancestors of node i, sorted ascending. A node u is an ancestor of v if there is a directed path from u to v. A node is never its own ancestor.