class GraphePond:
    def __init__(self):
        self.liste_adjacence = {}

    def addArc(self,u,v,p):
        if u not in self.liste_adjacence:
            self.liste_adjacence[u] = { v : p }
        else:
            self.liste_adjacence[u][v] = p