From adjacency matrix to adjacency list#3981