#include <bits/stdc++.h>
using namespace std;
const long long N = (long long)(5e5) + 322;
const long long INF = (long long)(1e9);
const long long mod = (long long)(1e9) + 7;
const double eps = 1e-9;
int n, m, k, d[N], u[N], mx, x, y, dp[N], s, t;
queue<int> q;
vector<int> v[N];
bool check(int dist) {
  for (long long i = 1; i <= n; ++i) d[i] = INF;
  d[s] = 0;
  q.push(s);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    if (u[x]) {
      d[x] = 0;
    }
    if (d[x] >= dist) continue;
    for (auto it : v[x]) {
      if (d[it] > d[x] + 1) {
        d[it] = d[x] + 1;
        q.push(it);
      }
    }
  }
  return (d[t] <= dist);
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> k;
  for (long long i = 1; i <= k; ++i) {
    cin >> x;
    u[x] = 1;
  }
  for (long long i = 1; i <= m; ++i) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  cin >> s >> t;
  int l = 0, r = 1000000;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (l >= n)
    cout << -1;
  else
    cout << l + 1;
  return 0;
}
