#include <stdio.h>
#include <math.h>
#include<algorithm>
#include<string>
#include<cstdlib>
#include<cctype>
#include<cstring>
#include<iostream>
using namespace std;
const int maxn=1001;
int cost[maxn][maxn];
int d[maxn];
bool used[maxn];
int maxn1=-1;
const int INF=0x3f3f3f3f;//int类型最大值的一班还少一些
void work(int s)
{
fill(d,d+maxn1+1,INF);
fill(used,used+maxn1+1,false);
d[s]=0;
while(true)
{
int v=-1;
for(int u=0; u<=maxn1; u++)
if(!used[u]&&(v==-1||d[u]<d[v]))
v=u;
if(v==-1)
break;
used[v]=true;
for(int u=0; u<=maxn1; u++)
d[u]=min(d[u],d[v]+cost[v][u]);
}
}
int main()
{
int T,S,D;
int a,b,t;
int s;
int dd;
int minn=0x3f3f3f3f;
while(~scanf("%d%d%d",&T,&S,&D))
{
minn=0x3f3f3f3f;
for(int i=0; i<=1000; i++)
for(int j=0; j<=1000; j++)
cost[i][j]=0x3f3f3f3f;
for(int i=0; i<T; i++)
{
scanf("%d%d%d",&a,&b,&t);
if(cost[a][b]>t)//处理重边
{cost[a][b]=t;
cost[b][a]=t;}
maxn1=max(maxn1,max(a,b));
}
for(int i=0; i<=maxn1; i++)
for(int j=0; j<=maxn1; j++)
if(!cost[i][j])
cost[i][j]=0x3f3f3f3f;
for(int i=0; i<S; i++)
{
scanf("%d",&s);
cost[0][s]=0;
cost[s][0]=0;
}
work(0);
for(int i=0; i<D; i++)
{
scanf("%d",&dd);
minn=min(minn,d[dd]);
}
printf("%d\n",minn);
}
return 0;
}