You are given an undirected connected graph G with N nodes and M edges. Every node has a value A[i] assigned to it.
The value of a simple path between node u and v is as follows:
Find the minimum possible path value of any simple paths between start and end nodes.
Input format
Output format
Print the minimum possible path value of any simple path between start and end nodes.
Constraints
1≤N≤105N−1≤M≤min(105,N×(N−1)/2)1≤A[i]≤106
There are 3 simple paths between nodes 2 and 4 :-