TreeToAdjacencyList

TreeToAdjacencyList[tree]
gets the adjacency list of tree., where the i th element of the adjacency list is the parent node of node i.