Build the adjacency list
Write build_graph(edges) that turns a list of (a, b) pairs describing
two-way connections into a dictionary from each node to a sorted list
of its neighbours. Every node that appears in any edge must be a key.
build_graph([("A", "B"), ("A", "C"), ("C", "B")])
-> {"A": ["B", "C"], "B": ["A", "C"], "C": ["A", "B"]}
build_graph([]) -> {}
The point is to practise the adjacency-list representation.
def build_graph(edges):
...