#include <bits/stdc++.h>
using namespace std;
vector<int> v[200005];
int n, m, k, S, E, F, L, M, rst, cnt;
int l[200005];
bool ck[200005];
bool in[200005];
bool bfs() {
  queue<int> q;
  int k, i, j, w;
  q.push(S);
  while (!q.empty()) {
    k = q.front();
    q.pop();
    in[k] = 0;
    if (ck[k]) l[k] = 0;
    if (k == E) return 1;
    if (l[k] == M) continue;
    w = l[k] + 1;
    for (j = 0; j < v[k].size(); j++) {
      i = v[k][j];
      if (l[i] <= w) continue;
      l[i] = w;
      if (!in[i]) q.push(i);
    }
  }
  return 0;
}
int main() {
  int i, p, q;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= k; i++) {
    scanf("%d", &p);
    ck[p] = 1;
  }
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &p, &q);
    v[p].push_back(q);
    v[q].push_back(p);
  }
  scanf("%d%d", &S, &E);
  F = 1;
  L = n;
  while (F <= L) {
    M = (F + L) / 2;
    for (i = 1; i <= n; i++) {
      l[i] = 99999999;
      in[i] = 0;
    }
    if (bfs()) {
      L = M - 1;
      rst = M;
    } else
      F = M + 1;
  }
  printf("%d", rst == 0 ? -1 : rst);
  return 0;
}
