AjencyListDirectedGraph and AdjencyListUndirectedGraph.