import sys input = sys.stdin.readline from heapq import heappop,heappush N,M,C=map(int,input().split()) EDGE=[list(map(int,input().split())) for i in range(M)] for i in range(M): EDGE[i][0]-=1 EDGE[i][1]-=1 Q=list(map(int,input().split())) for i in range(C): Q[i]-=1 USE=[1]*M for q in Q: USE[q]^=1 DP=[-1<<63]*N DP[0]=0 Q=[(0,0)] E=[[] for i in range(N)] for i in range(M): if USE[i]==0: continue x,y,dis=EDGE[i] E[x].append((y,dis)) #print(E) while Q: now,ind=heappop(Q) if DP[ind]!=now: continue for to,w in E[ind]: if DP[to]