#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double eps = 1e-9;
const double pi = acos(-1.0);
const int maxn = (int)1e5 + 10;
const int INF = (int)1e9;
int vv[maxn], s, t, d[maxn], n;
vector<int> g[maxn];
bool check(int qq) {
  for (int i = 0; i < n; i++) d[i] = INF;
  queue<int> q;
  d[s] = 0;
  q.push(s);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    if (d[v] == qq) continue;
    for (int i = 0; i < (int)(g[v]).size(); i++) {
      int to = g[v][i];
      if (vv[to]) {
        if (d[to] == 0) continue;
        d[to] = 0;
        q.push(to);
      } else {
        if (d[v] + 1 < d[to]) {
          d[to] = d[v] + 1;
          q.push(to);
        }
      }
    }
  }
  return d[t] != INF;
}
int main() {
  int m, k, x, y;
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    scanf("%d", &x);
    --x;
    vv[x] = 1;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    --x;
    --y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  cin >> s >> t;
  --s;
  --t;
  int l = 0;
  int r = n - 1;
  while (l < r - 1) {
    int mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  if (!check(r))
    cout << -1 << endl;
  else
    cout << r << endl;
  return 0;
}
