#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
int a, b, c, d, i, j, n, m, k, s, t;
bool cool[100001];
vector<int> sm[100001];
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    q;
int ds[100001];
bool check(int d) {
  memset(ds, 63, sizeof(ds));
  ds[s] = 0;
  while (!q.empty()) q.pop();
  q.push(make_pair(0, s));
  while (!q.empty()) {
    int v = q.top().second, cd = q.top().first;
    q.pop();
    if (ds[v] != cd) continue;
    for (int _n(((int)((sm[v]).size())) - 1), i(0); i <= _n; i++) {
      int w = sm[v][i];
      int nd = cd + 1;
      if (!cool[v] && nd > d) continue;
      if (cool[w]) nd = 0;
      if (nd > d) continue;
      if (nd < ds[w]) {
        ds[w] = nd;
        q.push(make_pair(nd, w));
        if (w == t) return 1;
      }
    }
  }
  if (ds[t] <= d)
    return 1;
  else
    return 0;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int _n((k)-1), i(0); i <= _n; i++) {
    scanf("%d", &a);
    --a;
    cool[a] = 1;
  }
  for (int _n((m)-1), i(0); i <= _n; i++) {
    scanf("%d%d", &a, &b);
    --a;
    --b;
    sm[a].push_back(b);
    sm[b].push_back(a);
  }
  srand(25091992);
  for (int _n((n)-1), i(0); i <= _n; i++)
    random_shuffle((sm[i]).begin(), (sm[i]).end());
  scanf("%d%d", &s, &t);
  --s;
  --t;
  if (!check(n)) {
    printf("-1\n");
    exit(0);
  }
  int l = 0, r = n;
  while (r - l > 1) {
    int xx = (r + l) / 2;
    if (check(xx))
      r = xx;
    else
      l = xx;
  }
  printf("%d\n", r);
}
