Simple implementation of graphs as adjacency-lists.