You are given a network of n nodes labeled 1 to n and a list times where times[i] = [u, v, w] means a signal travels from u to v in w time.
Send a signal from node k. Return the time it takes for all nodes to receive the signal, or -1 if some node is unreachable.