Directed and undirected graphs