from typing import List, Dict, Any, Tuple
import priority

class Graph:
    adjacencies: Dict[Any, List[Tuple]]

    def __init__(self):
        self.adjacencies = {}

    def __str__(self):
        ...


    def add_vertex(self, key):
         self.adjacencies[key] = []


    def add_edge(self, v1, v2, weight):
        self.adjacencies[v1].append( (v2, weight))


    def weight(self, v1, v2):
        ...

    def dijkstra(self, source):
        dist = {}
        path = {}
        for v in self.adjacencies:
            dist[v] = float('inf')
            path[v] = []
        dist[source] = 0

        d = dist.copy()
        queue = priority.PriorityQueue(d)

        ....

        return dist, path


G = Graph()
for i in range(6):
    G.add_vertex(chr(i+65))
assert str(G) == "A: [], B: [], C: [], D: [], E: [], F: [], "
G.add_edge("A","B",1 )
G.add_edge("A", "D",5 )
G.add_edge("A", "F",3 )
G.add_edge("B", "C",2 )
G.add_edge("B", "D",4 )
G.add_edge("C", "E",4 )
G.add_edge("D", "E",2 )
G.add_edge("D", "F",1 )
G.add_edge("E", "F",3 )
assert str(G) == "A: [Bw1, Dw5, Fw3, ], B: [Cw2, Dw4, ], C: [Ew4, ], D: [Ew2, Fw1, ], E: [Fw3, ], F: [], "
assert G.weight("C","E") == 4
assert G.weight("E","C") is None
assert G.weight("A","C") is None
print(G.dijkstra("A"))
print(G.dijkstra("B"))

