#include <bits/stdc++.h>
using namespace std;
int n, m, s, t;
vector<int> g[100005];
int pres[100005];
int dis[100005], mark[100005], dp[100005];
const int inf = (int)1e9 + 2;
bool possible(int q) {
  for (int i = 1; i <= n; ++i) dis[i] = inf, mark[i] = 0;
  dis[s] = 0;
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      pq;
  pq.push(make_pair(0, s));
  while (!pq.empty()) {
    pair<int, int> xp = pq.top();
    pq.pop();
    int x = xp.second;
    if (mark[x]) continue;
    mark[x] = 1;
    if (dis[x] == q && !pres[x]) continue;
    if (dp[x] <= q - dis[x]) dis[x] = min(dis[x], dp[x]);
    for (int v : g[x])
      if (!mark[v]) {
        if (dis[v] > 1 + dis[x]) {
          dis[v] = 1 + dis[x];
          if (pres[v]) dis[v] = 0;
          if (dp[v] <= q - dis[v]) dis[v] = min(dis[v], dp[v]);
          pq.push(make_pair(dis[v], v));
        }
      }
  }
  return dis[t] < inf;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  int k;
  cin >> k;
  queue<int> q;
  for (int i = 1; i <= n; ++i) dp[i] = inf;
  while (k--) {
    int x;
    cin >> x;
    pres[x] = 1;
    q.push(x);
    mark[x] = 1;
    dp[x] = 0;
  }
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  cin >> s >> t;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (int v : g[x])
      if (!mark[v]) {
        dp[v] = 1 + dp[x];
        q.push(v);
        mark[v] = 1;
      }
  }
  int lo = 1, hi = n - 1, mid, ans = -1;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (possible(mid)) {
      ans = mid;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  cout << ans << '\n';
}
