#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
int n, m, k, st, en, f[N], vol[N];
vector<int> v[N];
priority_queue<pair<int, int> > q;
bool minimize(int &x, int y) {
  if (x > y)
    x = y;
  else
    return 0;
  return 1;
}
void prepare() {
  scanf("%d%d%d", &n, &m, &k);
  int x, y;
  while (k--) {
    scanf("%d", &x);
    vol[x] = 1;
  }
  for (auto i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  scanf("%d%d", &st, &en);
}
bool check(int len) {
  for (auto i = 1; i <= n; i++) f[i] = len + 1;
  f[st] = 0;
  q.push(pair<int, int>(0, st));
  while (!q.empty()) {
    int cw = -q.top().first, cx = q.top().second;
    q.pop();
    if (cw > f[cx]) continue;
    if (vol[cx]) f[cx] = 0;
    if (f[cx] == len) continue;
    for (auto y : v[cx])
      if (minimize(f[y], f[cx] + 1)) q.push(pair<int, int>(-f[y], y));
  }
  return f[en] <= len;
}
int main() {
  prepare();
  int L = 1, R = n;
  while (L <= R) {
    int M = (L + R) >> 1;
    if (check(M))
      R = M - 1;
    else
      L = M + 1;
  }
  cout << ((L <= n) ? L : -1);
}
