def addEdge(self, u, v):
    self.graph[u].append(v)
    if (v not in self.graph.keys()):
        self.graph[v] = []
def addEdge(self, u, v):
    self.graph[u].append(v)
    if (v not in self.graph.keys()):
        self.graph[v] = []