Graph implementation using Python dictionaries.