#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7, maxn = 1e5 + 5;
vector<int> a[maxn];
int d[maxn], n, second, t;
bool isp[maxn];
bool bfs(int v) {
  queue<pair<int, int> > q;
  for (int i = 0; i <= n; i++) d[i] = inf;
  q.push({second, 0});
  d[second] = 0;
  while (!q.empty()) {
    int u = q.front().first, d1 = q.front().second;
    q.pop();
    if (d1 != d[u] || d1 == v) continue;
    for (int i : a[u]) {
      if (d1 + 2 > d[i]) continue;
      d[i] = d1 + 1;
      if (isp[i]) d[i] = 0;
      q.push({i, d[i]});
    }
  }
  return (d[t] < inf);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m, k;
  cin >> n >> m >> k;
  while (k--) {
    int p;
    cin >> p;
    isp[p] = true;
  }
  while (m--) {
    int e1, e2;
    cin >> e1 >> e2;
    a[e1].push_back(e2);
    a[e2].push_back(e1);
  }
  cin >> second >> t;
  int l = 1, r = n, ans = n + 1;
  while (l <= r) {
    int md = (l + r) / 2;
    if (bfs(md)) {
      r = md - 1;
      ans = md;
    } else
      l = md + 1;
  }
  if (ans > n) ans = -1;
  cout << ans << '\n';
  return 0;
}
