#include <bits/stdc++.h>
using namespace std;
vector<int> adjList[200010];
vector<int> locs;
int N, M, K, S, T;
int P[200010], R[200010];
bool vis[200010];
int findS(int x) {
  if (P[x] != x) P[x] = findS(P[x]);
  return P[x];
}
void mergeS(int x, int y) {
  int px = findS(x), py = findS(y);
  if (px == py) return;
  if (R[x] < R[y])
    P[py] = px;
  else
    P[px] = py;
  if (R[x] == R[y]) R[x] += 1;
}
bool possib(int Q) {
  queue<pair<int, int>> q;
  for (int i = 0; i < N; i++) {
    P[i] = i;
    R[i] = 0;
    vis[i] = false;
  }
  for (int i = 0; i < locs.size(); i++) {
    q.push(make_pair(locs[i], 0));
    vis[locs[i]] = true;
  }
  while (!q.empty()) {
    int x = q.front().first;
    int d = q.front().second;
    q.pop();
    if (d == Q / 2) continue;
    for (auto v : adjList[x]) {
      mergeS(x, v);
      if (vis[v]) continue;
      q.push(make_pair(v, d + 1));
      vis[v] = true;
    }
  }
  int ps = findS(S), pt = findS(T);
  if (ps == pt) return true;
  if (Q & 1) {
    map<int, vector<int>> parts;
    for (int i = 0; i < N; i++)
      if (vis[i]) parts[findS(i)].push_back(i);
    queue<int> rc;
    rc.push(ps);
    for (int i = 0; i < N; i++) vis[i] = false;
    while (!rc.empty()) {
      int c = rc.front();
      rc.pop();
      if (c == pt) return true;
      for (auto u : parts[c])
        for (auto v : adjList[u])
          if (!vis[findS(v)]) {
            vis[findS(v)] = true;
            rc.push(findS(v));
          }
    }
  }
  return false;
}
int main() {
  cin >> N >> M >> K;
  for (int i = 0; i < K; i++) {
    int x;
    cin >> x;
    x--;
    locs.push_back(x);
  }
  for (int i = 0; i < M; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adjList[u].push_back(v);
    adjList[v].push_back(u);
  }
  cin >> S >> T;
  S -= 1;
  T -= 1;
  locs.push_back(T);
  int ans = 0;
  for (int i = (1 << 16); i >= 1; i >>= 1)
    if (!possib(ans + i)) ans += i;
  if (ans > N)
    cout << -1 << endl;
  else
    cout << ans + 1 << endl;
}
