#include <bits/stdc++.h>
using namespace std;
vector<int> fo[100010];
vector<int> vol;
bool is_vol[100010];
int N, M, K, S, F;
int sp[100010], base[100010];
int Q[100010], QL, QR;
void BFS() {
  QL = QR = 0;
  memset(sp, -1, sizeof sp);
  for (int i = 0; i < ((int)(vol).size()); ++i)
    sp[vol[i]] = 0, base[vol[i]] = vol[i], Q[QR++] = vol[i];
  while (QL < QR) {
    int T = Q[QL++];
    for (int i = 0; i < ((int)(fo[T]).size()); ++i)
      if (sp[fo[T][i]] == -1) {
        sp[fo[T][i]] = sp[T] + 1;
        base[fo[T][i]] = base[T];
        Q[QR++] = fo[T][i];
      }
  }
}
int MAX;
bool conn[100010];
void go(int vr, int root) {
  if (conn[vr]) return;
  conn[vr] = true;
  for (int i = 0; i < ((int)(fo[vr]).size()); ++i) {
    int to = fo[vr][i], dist = sp[vr] + 1;
    if (dist > MAX) continue;
    if (base[to] != root) {
      if (dist + sp[to] <= MAX) go(base[to], base[to]);
    } else
      go(to, root);
  }
}
bool TRY(int how) {
  memset(conn, 0, sizeof conn);
  MAX = how;
  go(S, S);
  return conn[F];
}
int main() {
  scanf("%d%d%d", &N, &M, &K);
  vol.resize(K);
  for (int i = 0; i < K; ++i)
    scanf("%d", &vol[i]), --vol[i], is_vol[vol[i]] = true;
  for (int i = 0; i < M; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a;
    --b;
    fo[a].push_back(b);
    fo[b].push_back(a);
  }
  scanf("%d%d", &S, &F);
  --S;
  --F;
  if (!is_vol[F]) vol.push_back(F), is_vol[F] = true;
  BFS();
  int lo = 0, hi = 100010;
  for (;;) {
    if (lo + 1 >= hi) {
      if (!TRY(lo)) lo = hi;
      break;
    }
    int mid = (lo + hi) >> 1;
    if (TRY(mid))
      hi = mid;
    else
      lo = mid;
  }
  printf("%d\n", TRY(lo) ? lo : -1);
  return 0;
}
