Graph Theory Using Python Dictionaries