Given a connected graph G = (V, E) and a weight function w: E → N. Let H be a subgraph of G, we define the weight of H w(H) to be the sum of weight of all the edge in H.
In this problem, you need to answer the weight of the second minimum spanning tree. Namely, let T1 be a minimum spanning tree of G, find the weight of another spanning tree T2 such that w(T1) <= w(T2) and w(T2) <= w(T'), where T' is a spanning tree of G, T' ≠ T1.
There are two integer in the first line, n, m, which represent |V|, |E|.
In the following m lines, each line contains three integer: u, v, c, which is the endpoints of the edge and the weight of the edge respectivlely.
Output the answer in a single line.