#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long s, t;
vector<long long> g[100005];
long long ok[100005];
long long vis[100005];
const long long inf = 1e9;
bool check(long long x) {
  queue<pair<long long, long long> > q;
  q.push(make_pair(s, 0));
  for (long long i = 0; i <= n; i++) vis[i] = inf;
  vis[s] = 0;
  while (q.empty() == false) {
    long long u = q.front().first;
    long long dd = q.front().second;
    q.pop();
    if (dd > x) continue;
    if (u == t) return true;
    for (auto i : g[u]) {
      if (ok[i] && vis[i] > 0 && dd < x) {
        vis[i] = 0;
        q.push(make_pair(i, 0));
      } else {
        long long D = dd + 1;
        if (D > x) continue;
        if (vis[i] <= D) continue;
        vis[i] = D;
        q.push(make_pair(i, D));
      }
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> k;
  for (long long i = 1; i <= k; i++) {
    long long x;
    cin >> x;
    ok[x] = 1;
  }
  for (long long i = 1; i <= m; i++) {
    long long u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  cin >> s >> t;
  if (s == t) {
    cout << "0\n";
    return 0;
  }
  long long lo = 0;
  long long hi = n + 10;
  while (hi > lo) {
    long long mid = lo + (hi - lo) / 2;
    if (check(mid))
      hi = mid;
    else
      lo = mid + 1;
  }
  if (check(lo)) {
    cout << lo << endl;
  } else {
    cout << "-1\n";
  }
  return 0;
}
