
Given a directed weighted graph with nodes labeled 0 to n - 1, an initial edge list edges, and a sequence of update operations, return the shortest path cost from source to target after each update. Each update changes the graph dynamically by adding a new edge, removing an existing edge, or changing an edge weight. If no path exists after an update, return -1 for that step.
1 <= n <= 2000 <= edges.length <= 50001 <= updates.length <= 10000 <= u, v < n1 <= w <= 10^6"add", "remove", "update"