Distance
In a large city a cellular network operator is holding a competition for subscribers to promote their new "pedestrian navigator" service. The main prize will be awarded to the first pair of subscribers to meet each other. The competition ends when any such meeting takes place.
At the start of the competition all the subscribers are at their known positions, are able to see each other on their smartphones, and are moving at a constant speed of 10 km/h taking only pedestrian walks. Each subscriber is willing to win the prize and is indifferent to the others.
In order to prepare for an award ceremony the cellular network operator needs to know the minimal amount of time after which the competition may come to an end.
Input
In the first line of input integers N, K, and L are given - the number of subscribers in a cellular network company (2 ≤ N ≤ 10^5), the number of junctions (1 ≤ K ≤ 10^5), and the number of pedestrian walks (1 ≤ L ≤ 10^5) in the city, respectively.
On the next N lines of input S_i (1 ≤ S_i ≤ K) numbers are given - initial positions of subscribers (in the terms of transport graph junctions).
The next L lines of input pedestrian paths are given in the form of integers B_i, C_i and D_i separated by spaces. Each line denotes that there is a two-way pedestrian path between junctions B_i and C_i (1 ≤ B_i, C_i ≤ K, B_i ≠ C_i) with a length of D_i (1 ≤ D_i ≤ 5000) kilometers.
Output
Output the minimal possible number of minutes that may elapse from the start till the end of the contest.
It is guaranteed that at least one pair of the subscribers can meet.