#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1 << 17, oo = (int)1e9;
int N, M, K;
int s, t;
bool vol[MAXN];
vector<int> G[MAXN];
int dist[MAXN];
bool ok(int maxDist) {
  if (maxDist == 0) return (s == t);
  set<pair<int, int> > S;
  for (int i = 0; i < (int)(N); ++i) dist[i] = oo;
  dist[s] = 0;
  S.insert(pair<int, int>(dist[s], s));
  while (!S.empty()) {
    pair<int, int> top = *S.begin();
    S.erase(S.begin());
    int u = top.second;
    for (int i = 0; i < (int)(((int)(G[u]).size())); ++i) {
      int v = G[u][i];
      int nw = dist[u] + 1;
      if (nw > maxDist || nw >= dist[v]) continue;
      if (v == t) return true;
      if (vol[v]) nw = 0;
      if (dist[v] != oo) S.erase(pair<int, int>(dist[v], v));
      dist[v] = nw;
      S.insert(pair<int, int>(dist[v], v));
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> N >> M >> K;
  for (int i = 0; i < (int)(K); ++i) {
    int x;
    cin >> x;
    --x;
    vol[x] = true;
  }
  for (int i = 0; i < (int)(M); ++i) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 0; i < (int)(N); ++i)
    random_shuffle((G[i]).begin(), (G[i]).end());
  cin >> s >> t;
  --s;
  --t;
  int lo = 0, hi = N - 1;
  while (lo <= hi) {
    int mid = (lo + hi) / 2;
    if (ok(mid))
      hi = mid - 1;
    else
      lo = mid + 1;
  }
  if (lo >= N)
    cout << -1 << endl;
  else
    cout << lo << endl;
  return 0;
}
