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.*;
import java.util.*;

/**
 * Created by Alvin on 8/21/2016.
 */

public class Codeforces_round_368_div_2_Bakery {

    static HashMap<Integer, ArrayList<Edge>> graph;
    static HashSet<Integer> vertices;
    static ArrayList<Edge> allEdges;

    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        init();
        int n = input.nextInt();
        int m = input.nextInt();
        int k = input.nextInt();
        for (int i = 0; i < m; i++) {
            int start = input.nextInt();
            int end = input.nextInt();
            int weight = input.nextInt();
            addEdge(start, end, weight);
            addEdge(end, start, weight);
        }
        HashSet<Integer> bakery = new HashSet<>();
        for (int i = 0; i < k; i++) {
            bakery.add(input.nextInt());
        }
        int lowestCost = Integer.MAX_VALUE;
        for (Edge current : allEdges) {
            if (bakery.contains(current.start) && !bakery.contains(current.end)) {
                lowestCost = Math.min(current.weight, lowestCost);
            } else if (bakery.contains(current.end) && !bakery.contains(current.start)) {
                lowestCost = Math.min(current.weight, lowestCost);
            }
        }

        System.out.println(lowestCost == Integer.MAX_VALUE ? -1 : lowestCost);
        out.close();
    }

    public static ArrayList<Edge> getMST() {
        ArrayList<Edge> solutionList = new ArrayList<>();
        Collections.sort(allEdges, new Comparator<Edge>() {
            @Override
            public int compare(Edge o1, Edge o2) {
                return new Integer(o1.weight).compareTo(o2.weight);
            }
        });

        for (int current : vertices) {
            DisjointSet.createSet(current);
        }

        for(Edge currentEdge : allEdges) {

            // Obtain the sets of two vertices of the edge
            int startRoot = DisjointSet.findSet(currentEdge.start);
            int endRoot = DisjointSet.findSet(currentEdge.end);

            // Check if the vertices are in same set or different set
            // If vertices are in same set then ignore the edge
            // Will create a cycle or unnecessary edge
            if(startRoot == endRoot) {
                continue;
            } else {
                solutionList.add(currentEdge);
                DisjointSet.unionSet(currentEdge.start, currentEdge.end);
            }
        }

        return solutionList;
    }

    public static void init() {
        graph = new HashMap<>();
        allEdges = new ArrayList<>();
        vertices = new HashSet<>();
    }


    public static void addEdge(int start, int end, int weight) {
        ArrayList<Edge> list = graph.containsKey(start) ? graph.get(start) : new ArrayList<>();
        Edge currentEdge = new Edge(start, end, weight);
        allEdges.add(currentEdge);
        vertices.add(start);
        vertices.add(end);
        list.add(currentEdge);
        graph.put(start, list);
    }

    static class Edge {
        int start;
        int end;
        int weight;

        public Edge(int s, int e, int weight) {
            this.start = s;
            this.end = e;
            this.weight = weight;
        }
    }

    static class DisjointSet {
        static HashMap<Integer, Node> map = new HashMap<>();

        public static void createSet(int data) {
            Node node = new Node(data, 0);
            node.parent = node;
            map.put(data, node);
        }

        public static int findSet(int data) {
            int parentData = map.get(data).parent.data;
            if (parentData == data) {
                return data;
            } else {
                return findSet(parentData);
            }
        }

        public static boolean unionSet(int firstSet, int secondSet) {
            int firstParentID = findSet(firstSet);
            int secondParentID = findSet(secondSet);
            Node firstParent = map.get(firstParentID);
            Node secondParent = map.get(secondParentID);

            // If they are part of same set do nothing
            if (firstParentID == secondParentID) {
                return false;
            }

            if (firstParent.rank > secondParent.rank) {
                secondParent.parent = firstParent;
            } else if (firstParent.rank < secondParent.rank) {
                firstParent.parent = secondParent;
            } else {
                firstParent.rank++;
                secondParent.parent = firstParent;
            }
            map.put(firstParentID, firstParent);
            map.put(secondParentID, secondParent);

            return true;
        }

        static class Node {
            int data;
            Node parent;
            int rank;

            public Node(int data, int rank) {
                this.data = data;
                this.rank = rank;
            }
        }
    }


    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

