#include <bits/stdc++.h>
using namespace std;
int n, m, k, src, dst, s, t, ans, node, vol[200001], dist[200001],
    present[200001];
list<int> adj[200001];
bool BFS(int q) {
  for (int i = 1; i <= n; i++) {
    dist[i] = INT_MAX - 1;
    present[i] = 0;
  }
  queue<int> Q;
  Q.push(s);
  present[s] = 1;
  dist[s] = 0;
  while (!Q.empty()) {
    int tmp = Q.front();
    Q.pop();
    present[tmp] = 0;
    if (vol[tmp]) dist[tmp] = 0;
    if (tmp == t) return true;
    int new_dist = dist[tmp] + 1;
    if (new_dist > q) continue;
    for (auto it : adj[tmp]) {
      if (new_dist < dist[it]) {
        dist[it] = new_dist;
        if (!present[it]) {
          Q.push(it);
          present[it] = 1;
        }
      }
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    cin >> node;
    vol[node] = 1;
  }
  for (int i = 0; i < m; i++) {
    cin >> src >> dst;
    adj[src].push_back(dst);
    adj[dst].push_back(src);
  }
  cin >> s >> t;
  int lft = 1, rt = n, mid;
  while (lft <= rt) {
    mid = (rt - lft) / 2 + lft;
    if (BFS(mid))
      ans = mid, rt = mid - 1;
    else
      lft = mid + 1;
  }
  if (!ans)
    cout << -1;
  else
    cout << ans;
  return 0;
}
