#include <bits/stdc++.h>
#define N 100005
#define A first
#define B second
#define MAX 1000000005
using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;

vii adjList[N];
priority_queue<ii,vii, greater<ii> > Q;
int dist[N];

bool checkpoint[N], finish[N], visited[N];

void run_djikstras(){

	int u=0, v=0, w=0;

	memset(visited,false,sizeof visited);
	for(int i=0;i<N;i++)	dist[i]=MAX;

	Q.push(make_pair(0,0));
	while(!Q.empty()){
		u=Q.top().B;
		w=Q.top().A;
		Q.pop();
		visited[u]=true;
		if(dist[u]>w)	dist[u]=w;
		for(int i=0;i<(int)adjList[u].size();i++){
			v=adjList[u][i].B;
			if(dist[v]>dist[u]+adjList[u][i].A)	dist[v]=dist[u]+adjList[u][i].A;
			if(!visited[v]){
				visited[v]=true;
				Q.push(make_pair(dist[v],v));
			}
		}
	}
}

int main(){

	//cout<<MAX<<endl;

	memset(checkpoint, false, sizeof(checkpoint));
	memset(finish, false, sizeof(finish));

	int n, m, c, f, temp, u, v, w;
	cin>>n>>m>>c>>f;

	for(int i=0;i<c;i++){
		cin>>temp;
		checkpoint[temp]=true;
	}

	for(int i=0;i<f;i++){
		cin>>temp;
		finish[temp]=true;
	}


	for(int i=0;i<m;i++){
		cin>>u>>v>>w;
		adjList[u].push_back(make_pair(w, v));
	}

	run_djikstras();	//gets all the shortest distances in the array dist[]

	int ans=MAX, best=MAX; 

	for(int i=0;i<=n;i++)
		if(finish[i])	best = min(best, dist[i]);	//best is the shortest distance from 0 to a finish node directly connected to it.

	for(int i=0;i<=n;i++){
		if(checkpoint[i]){
			for(int j=0;j<(int)adjList[i].size();j++){
				if(adjList[i][j].B==0)	ans = min(ans, dist[i] + best);	//if 0 is connected
				if(finish[adjList[i][j].B])	ans = min(ans, dist[i] + adjList[i][j].A);	//if a finishing point is connected
			}
		}
	}

	if(ans==MAX)	cout<<"-1"<<endl;
	else cout<<ans<<endl;

	//system("pause");
	return 0;
}