adjList to adjlist