#include <bits/stdc++.h>
using namespace std;
const int MXN = 1e5 + 10;
int n, m, k, l, mid, r, t, s, f, A[MXN], T[MXN];
vector<int> V[MXN];
int Solve(int c) {
  priority_queue<pair<int, int> > P;
  pair<int, int> pr;
  for (int i = 1; i <= n; i++) T[i] = 1e9;
  T[s] = 0;
  P.push(make_pair(0, s));
  while (P.size() > 0) {
    pr = P.top();
    pr.first *= -1;
    P.pop();
    if (pr.second == f) return (1);
    if (T[pr.second] < pr.first) continue;
    if (A[pr.second] == 1) pr.first = 0;
    for (int X : V[pr.second]) {
      if (T[X] <= pr.first + 1 || pr.first + 1 > c) continue;
      T[X] = pr.first + 1;
      P.push(make_pair(-pr.first - 1, X));
    }
  }
  return (0);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) scanf("%d", &t), A[t] = 1;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &r, &t);
    V[r].push_back(t);
    V[t].push_back(r);
  }
  scanf("%d%d", &s, &f);
  l = 0;
  r = n + 100;
  while (r - l > 1) {
    mid = (l + r) / 2;
    if (Solve(mid) == 1)
      r = mid;
    else
      l = mid;
  }
  if (r > n) r = -1;
  printf("%d", r);
  return (0);
}
