#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 123;
const int INF = (int)1e9 + 123;
const double eps = 1e-6;
int n, m, k, volunteers[N], x, y, s, t, num[N], cnt, d[N], l, r, mid, cntt[N];
bool used[N], v[N];
queue<pair<int, int> > q;
vector<int> g[N];
bool can(int k) {
  for (int i = 1; i <= n; i++) {
    d[i] = INF;
  }
  d[s] = 0;
  memset((cntt), 0, sizeof(cntt));
  while (q.size()) {
    q.pop();
  }
  q.push(make_pair(s, 0));
  while (q.size()) {
    x = q.front().first;
    y = q.front().second;
    cntt[x]++;
    assert(cntt[x] <= 7);
    q.pop();
    if (x == t) {
      return 1;
    }
    if (v[x]) {
      y = 0;
    }
    if (y == k) {
      continue;
    }
    for (int i = 0; i < g[x].size(); i++) {
      int to = g[x][i];
      if (d[to] > y + 1) {
        d[to] = y + 1;
        q.push(make_pair(to, y + 1));
      }
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> m >> k;
  for (int i = 1; i <= k; i++) {
    cin >> volunteers[i];
    v[volunteers[i]] = 1;
  }
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  cin >> s >> t;
  l = 1;
  r = n + 1;
  while (r - l > 1) {
    mid = (l + r) / 2;
    if (can(mid)) {
      r = mid;
    } else {
      l = mid + 1;
    }
  }
  if (can(l)) {
    cout << l << "\n";
  } else if (can(r) && r <= n) {
    cout << r << "\n";
  } else {
    cout << -1;
  }
  return 0;
}
