/*
TASK:trip
LANG:C++
*/
#include <cstdio>
#include <algorithm>
#define MAXV 10000
using namespace std;

class TD {
 public:
  int v, *dis;
  bool operator<(TD obj) {
   return ((*dis)>(*(obj.dis)));
  }
}T[1002];
int d[1002], used[1002]={0}, newc[1002];
int N=10, M, K, ans, s, L;
int A[1002][1002];

int main() {
 int i, ver, *des, a, b, ind;
 scanf("%d%d%d", &N, &M, &K);
 for(i=0; i<N; i++) {
  scanf("%d%d", &a, &b);
  A[a-1][b-1]=A[b-1][a-1]=1;
 }
 for(i=0; i<K; i++) {
  scanf("%d", &a);
  used[a-1]=1;
 }
 ans=-1;
for(s=0; s<N; s++) {
 //--INIT---------------------------
 for(i=0; i<N; i++) {
  T[i].v=i;
  T[i].dis=&d[i];
  newc[i]=!used[i];
  if(A[s][i]!=0) {d[i]=A[s][i];}
  else {d[i]=MAXV;}
 }
 d[s]=0;
 L=N;
 make_heap(T, T+L);
 pop_heap(T, T+L); L--;
 make_heap(T, T+L);
 //--BODY-----------------------------
 while(1) {
  if(L==0) break;
  if((*(T[0].dis)) == MAXV) break;
  ver=T[0].v;
  des=T[0].dis;
  for(i=0; i<N; i++) {
   if(A[ver][i]!=0) {
    if(d[i] > ((*des)+A[ver][i])) {
     d[i]=(*des)+A[ver][i];
     newc[i]+=((used[ver])?0:1);
     if(ans < newc[i]) {
      ans=newc[i];
      ind=i;
     }
    }
   }
  }
  pop_heap(T, T+L); L--;
  make_heap(T, T+L);
 }
 //--END------------------------------
}
 printf("%d\n", ans);
 return 0;
}
