Graph adjacency lists implementation.