#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e15;
const long long N = 2e5 + 5;
long long n, m, k, s, t, vol[N], dis[N];
vector<long long> ad[N];
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    qu;
void Input() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= k; ++i) {
    long long u;
    cin >> u;
    vol[u] = 1;
  }
  for (long long i = 1; i <= m; ++i) {
    long long u, v;
    cin >> u >> v;
    ad[u].push_back(v);
    ad[v].push_back(u);
  }
  cin >> s >> t;
}
bool Check(long long mid) {
  memset(dis, 0x3f, sizeof dis);
  ;
  dis[s] = 0;
  qu.push({0, s});
  while (!qu.empty()) {
    long long u = qu.top().second, dd = qu.top().first;
    qu.pop();
    if (dd != dis[u]) continue;
    for (auto y : ad[u]) {
      long long Tam = dd + 1;
      if (vol[y]) Tam = 0;
      if (dis[y] > Tam) {
        dis[y] = Tam;
        if (dis[y] < mid) qu.push({dis[y], y});
      }
    }
  }
  return dis[t] <= mid;
}
void Solve() {
  long long low = 0, high = n, Res = -1;
  while (low <= high) {
    long long mid = (low + high) / 2;
    if (Check(mid))
      Res = mid, high = mid - 1;
    else
      low = mid + 1;
  }
  cout << Res;
}
int main() {
  if (fopen("trash.inp", "r"))
    freopen("trash.inp", "r", stdin), freopen("trash.out", "w", stdout);
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  Input();
  Solve();
}
