Returns the last matching node in the paths
return path [ 1 ] [ i - 1 ] NEW_LINE def addEdge ( a : int , b : int ) -> None : NEW_LINE tree [ a ] . append ( b ) NEW_LINE tree [ b ] . append ( a ) NEW_LINE