# see the overview from 2026.07.31 sample_graph = { 'Alice': set(['Bob', 'Carol']), 'Bob': set(['Alice', 'Dave']), 'Carol': set(['Alice', 'Eve', 'Mallory']), 'Dave': set(['Frank', 'Eve', 'Bob']), 'Eve': set(['Carol', 'Grace', 'Dave']), 'Frank': set(['Dave', 'Heidi']), 'Grace': set(['Eve', 'Ivan', 'Mallory']), 'Heidi': set(['Frank', 'Ivan']), 'Ivan': set(['Heidi', 'Grace']), 'Mallory': set(['Carol', 'Grace']) } # This is an in-progress exercise def nth_degree_connections( graph: dict[str, set[str]], starting_vertex: str, max_n: int ): checkinglist=[[starting_vertex,0]] listvisited=list() x=[0,0] while len(listvisited)!=len(graph) and checkinglist!=[] and x[1]