#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1001, MOD = 1000000007;
vector<int> a[MAXN] = {};
int mark[MAXN] = {};
int s, t;
set<pair<int, int> > d;
int dis[MAXN];
int check(int x) {
  fill(dis, dis + MAXN, 1e+9);
  d.insert({0, s});
  pair<int, int> p;
  dis[s] = 0;
  while (d.size()) {
    p = *d.begin();
    d.erase(p);
    if (p.first >= x) break;
    if (dis[p.second] < p.first) continue;
    dis[p.second] = p.first;
    for (auto u : a[p.second]) {
      if (dis[u] > dis[p.second] + 1) {
        dis[u] = dis[p.second] + 1;
        if (mark[u]) dis[u] = 0;
        if (dis[u] > x) continue;
        d.insert({dis[u], u});
      }
    }
  }
  if (dis[t] <= x) return 1;
  return 0;
}
int main() {
  int n, m, k, x, y;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    scanf("%d", &x);
    mark[x] = 1;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    a[x].push_back(y);
    a[y].push_back(x);
  }
  scanf("%d%d", &s, &t);
  int l = 0, r = n + 1, mid;
  if (!check(n + 1)) return cout << -1, 0;
  while (r - l > 1) {
    mid = (r + l) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  cout << r;
}
