#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
int t, s, n, f[maxn], p[maxn], dis[maxn], inque[maxn];
vector<int> adj[maxn];
int check(int x) {
  fill(dis, dis + maxn, INT_MAX);
  memset(inque, 0, sizeof(inque));
  queue<int> Q;
  Q.push(s);
  dis[s] = 0;
  inque[s] = 1;
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    if (u == t) return 1;
    inque[u] = 0;
    if (dis[u] < x) {
      for (auto chld : adj[u]) {
        if (dis[chld] > dis[u] + 1) {
          dis[chld] = f[chld] ? 0 : dis[u] + 1;
          if (!inque[chld]) {
            Q.push(chld);
            inque[chld] = 1;
          }
        }
      }
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int m, k, i, j;
  cin >> n >> m >> k;
  for (i = 0; i < k; i++) {
    cin >> j;
    f[j] = 1;
  }
  for (i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  cin >> s >> t;
  int l = 0, r = n;
  while (l < r - 1) {
    int mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (r < n)
    cout << r << endl;
  else
    cout << -1 << endl;
  return 0;
}
