Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities.

To bake muffins in her bakery, Masha needs to establish flour supply from some storage. There are only k storages, located in different cities numbered a1, a2, ..., ak.

Unforunately the law of the country Masha lives in prohibits opening bakery in any of the cities which has storage located in it. She can open it only in one of another n - k cities, and, of course, flour delivery should be paid — for every kilometer of path between storage and bakery Masha should pay 1 ruble.

Formally, Masha will pay x roubles, if she will open the bakery in some city b (ai ≠ b for every 1 ≤ i ≤ k) and choose a storage in some city s (s = aj for some 1 ≤ j ≤ k) and b and s are connected by some path of roads of summary length x (if there are more than one path, Masha is able to choose which of them should be used).

Masha is very thrifty and rational. She is interested in a city, where she can open her bakery (and choose one of k storages and one of the paths between city with bakery and city with storage) and pay minimum possible amount of rubles for flour delivery. Please help Masha find this amount.

Input

The first line of the input contains three integers n, m and k (1 ≤ n, m ≤ 105, 0 ≤ k ≤ n) — the number of cities in country Masha lives in, the number of roads between them and the number of flour storages respectively.

Then m lines follow. Each of them contains three integers u, v and l (1 ≤ u, v ≤ n, 1 ≤ l ≤ 109, u ≠ v) meaning that there is a road between cities u and v of length of l kilometers .

If k > 0, then the last line of the input contains k distinct integers a1, a2, ..., ak (1 ≤ ai ≤ n) — the number of cities having flour storage located in. If k = 0 then this line is not presented in the input.

Output

Print the minimum possible amount of rubles Masha should pay for flour delivery in the only line.

If the bakery can not be opened (while satisfying conditions) in any of the n cities, print  - 1 in the only line.

Examples

Input

5 4 2
1 2 5
1 2 3
2 3 4
1 4 10
1 5


Output

3

Input

3 1 1
1 2 3
3


Output

-1

Note

<image>

Image illustrates the first sample case. Cities with storage located in and the road representing the answer are darkened. 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.StringTokenizer;
public class Solution123{
	static int coun = 0;
	static int size = 0;
	static ArrayList<Integer> arr = new ArrayList();
	static Pair[] p;
	public static void main(String[] args) throws IOException{
		FastReader sc = new FastReader();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		size = a;
		Graph g = new Graph();
		int[] ae = new int[c];
		while(b-- > 0){
			int q = sc.nextInt();
			int w = sc.nextInt();
			int e = sc.nextInt();
			g.addEdge(q - 1,w - 1,e);
		}
		int i = 0;
		while(c-- > 0){
			ae[i] = sc.nextInt();
			p[ae[i]-1].r = true;
			i++;
		}
		for(int j = 0;j < ae.length;j++){
			g.answer(ae[j] - 1);
		}
		Collections.sort(arr);
		if(arr.isEmpty()){
			System.out.println("-1");
		}else{
			System.out.println(arr.get(0));
		}
	}
	static class Graph{
		private static final boolean Integer = false;
		ArrayList<HashMap<Integer,Integer>> hmap[] = new ArrayList[size];
		public Graph(){
			p = new Pair[size];
			for(int i = 0;i < size;i++){
				hmap[i] = new ArrayList();
				p[i] = new Pair(false);
			}
		}
		void addEdge(int a,int b,int c){
			HashMap<Integer,Integer> h = new HashMap();
			h.put(b,c);
			hmap[a].add(h);
			HashMap<Integer,Integer> ha = new HashMap();
			ha.put(a,c);
			hmap[b].add(ha);
		}
		void answer(int a){
			ArrayList<Integer> ar = new ArrayList();
			for(HashMap<Integer,Integer> h : hmap[a]){
				for(Integer j: h.keySet()){
					if(!p[j].r)
						ar.add(h.get(j));
				}
			}
			Collections.sort(ar);
			//System.out.println(ar);
			if(!ar.isEmpty()){
				arr.add(ar.get(0));
			}
		}
	}
	static class Pair{
		boolean r;
		Pair(boolean result){
			r = result;
		}
	}
	public static int complement(int index){
		if(index == 0){
			return 1;
		}
		return 0;
	}
	private static long gcd(long a, long b)
	{
	    while (b > 0)
	    {
	        long temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}

	private static long gcd(long[] input)
	{
	    long result = input[0];
	    for(int i = 1; i < input.length; i++) result = gcd(result, input[i]);
	    return result;
	}
	private static long lcm(long a, long b)
	{
	    return a * (b / gcd(a, b));
	}

	private static long lcm(long[] input)
	{
	    long result = input[0];
	    for(int i = 1; i < input.length; i++) result = lcm(result, input[i]);
	    return result;
	}
	public static boolean[] sieveAlgo(int n){
		boolean isPrime[] = new boolean[n + 1];
		for (int i = 2; i <= n; i++) {
            isPrime[i] = true;
        }

        // mark non-primes <= n using Sieve of Eratosthenes
        for (int factor = 2; factor*factor <= n; factor++) {

            // if factor is prime, then mark multiples of factor as nonprime
            // suffices to consider mutiples factor, factor+1, ...,  n/factor
            if (isPrime[factor]) {
                for (int j = factor; factor*j <= n; j++) {
                    isPrime[factor*j] = false;
                }
            }
        }
        return isPrime;
	}
	public static int binarySearch(int[] arr,int low,int high,int key){
		while(low <= high){
			int mid = (low + high)/2;
			if(arr[mid] == key){
				return mid;
			}else if(arr[mid] < key){
				low = mid + 1;
			}else{
				high = mid - 1;
			}
		}
		return -1;
	}
	public static int ternarySearch(int[] arr,int l,int r,int key){
		if(r >= l){
			int mid1 = l + (r-1)/3;
			int mid2 = r - (r-1)/3;
			if(arr[mid1] == key){
				return mid1;
			}else if(arr[mid2] == key){
				return mid2;
			}
			if(key < arr[mid1]){
				return ternarySearch(arr,l,mid1-1,key);
			}else if(key > arr[mid2]){
				return ternarySearch(arr,mid2 + 1,r,key);
			}else{
				return ternarySearch(arr,mid1 + 1,mid2 - 1,key);
			}
		}
		return -1;
	}
	public static double fun(double x){
		return 2 * x * x - 12 * x + 7;
	}
	
	public static double tsModified(double start,double end){
		double l = start;
		double r = end;
		for(int i = 0;i < 200;i++){
			double mid1 = (l * 2 + r)/3;
			double mid2 = (l + 2 * r)/3;
			if(fun(mid1) < fun(mid2)){
				r = mid2;
			}else{
				l = mid1;
			}
		}
		double x = l;
		return fun(x);
	}
	public static String fmt(double d)
	{
	    if(d == (long) d)
	        return String.format("%d",(long)d);
	    else
	        return String.format("%s",d);
	}
	public static int[][] comparator(int[][] arr){
		Arrays.sort(arr, new Comparator<int[]>() {
            @Override
            public int compare(int[] a,int[] b) {
                Integer a1 = a[1];
                Integer b1 = b[1];
            	return b1.compareTo(a1);
            }
        });
		return arr;
	}
	public static StringBuilder[][] comparator2(StringBuilder[][] arr){
		Arrays.sort(arr, new Comparator<StringBuilder[]>() {
            @Override
            public int compare(StringBuilder[] a,StringBuilder[] b) {
                StringBuilder a1 = a[0];
                StringBuilder b1 = b[0];
            	return a1.toString().compareTo(b1.toString());
            }
        });
		return arr;
	}
	public static int[][] comparator2(int[][] arr){
		Arrays.sort(arr, new Comparator<int[]>() {
            @Override
            public int compare(int[] a,int[] b) {
                Integer a1 = a[0];
                Integer b1 = b[0];
            	return b1.compareTo(a1);
            }
        });
		return arr;
	}
	static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;
 
        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }
 
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        int nextInt()
        {
            return Integer.parseInt(next());
        }
 
        long nextLong()
        {
            return Long.parseLong(next());
        }
 
        double nextDouble()
        {
            return Double.parseDouble(next());
        }
 
        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
	public static String min(int m,int n){
		int[] arr = new int[m];
		arr[0] = 1;
		int sum = 1;
		int j = m - 1;
		for(int i = 1;i <= 18* m + 10;i++){
			if(sum != n){
				if(arr[j] == 9){
					j--;
				}else{
					arr[j]++;
					sum++;
				}
			}
			else{
				break;
			}
		}
		StringBuilder min = new StringBuilder("");
		for(int i = 0;i < arr.length;i++){
			min.append(arr[i]);
		}
		return min.toString();
	}
	public static String max(int m,int n){
		int[] arr = new int[m];
		arr[0] = 1;
		int sum = 1;
		int j = 0;
		for(int i = 1;i <= 9 * m + 10;i++){
			if(sum != n){
				if(arr[j] == 9){
					j++;
				}else{
					arr[j]++;
					sum++;
				}
			}
			else{
				break;
			}
		}
		StringBuilder min = new StringBuilder("");
		for(int i = 0;i < arr.length;i++){
			min.append(arr[i]);
		}
		return min.toString();
	}
    public static int KMPSearch(String txt,String pat){
		int m = pat.length();
		int n = txt.length();
		int lps[] = new int[m];
		int j = 0;
		int count = 0;
		PrefixTable(pat,m,lps);
		int i = 0;
		while (i < n)
	        {
	            if (pat.charAt(j) == txt.charAt(i))
	            {
	                j++;
	                i++;
	            }
	            if (j == m)
	            {
	            	count++;
	                j = lps[j-1];
	            }
	            else if (i < n && pat.charAt(j) != txt.charAt(i))
	            {
	                if (j != 0)
	                    j = lps[j-1];
	                else
	                    i = i+1;
	            }
	        }
		return count;
	}
	public static void PrefixTable(String pat,int m,int[] lps){
		int len = 0;
		int i = 1;
		lps[0] = 0;
		while(i < m){
			if(pat.charAt(i) == pat.charAt(len)){
				lps[i] = len + 1;
				i++;
				len++;
			}else if(len > 0){
				len = lps[len - 1];
			}else{
				lps[i] = 0;
				i++;
			}
		}
	}
    public int digit(int x){
    	int temp = x;
    	int count = 0;
    	while(temp != 0){
    		count++;
    		temp = temp/10;
    	}
    	return count;
    }
    public int sum(int x){
    	int temp = x;
    	int count = 0;
    	while(temp != 0){
    		count += temp % 10;
    		temp = temp/10;
    	}
    	return count;
    }
    public int product(int x){
    	int temp = x;
    	int count = 1;
    	while(temp != 0){
    		count*=temp % 10;
    		temp = temp/10;
    	}
    	return count;
    }
    public boolean isValid2(int x){
    	int temp = x;
    	while(temp != 0){
    		if(temp % 10 == 0){
    			return false;
    		}
    		temp = temp/10;
    	}
    	return true;
    }
    public boolean isValid(int x){
    	if(!isValid2(x)){
    		return false;
    	}else{
    		if(product(x) <= sum(x)){
    			return true;
    		}
    		return false;
    	}
    }
}