#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int maxn = 200010;
int vol[maxn] = {};
vector<int> a[maxn];
int dist[maxn] = {};
int st, en;
int used[maxn] = {};
int need;
bool dfseven(int v) {
  used[v] = 1;
  if (v == en) return true;
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (used[to]) continue;
    if (dist[to] == -1) continue;
    if (dist[v] == need && dist[to] == need) continue;
    if (dfseven(to)) return true;
  }
  return false;
}
bool dfsodd(int v) {
  used[v] = 1;
  if (v == en) return true;
  for (int i = 0; i < int((a[v]).size()); ++i) {
    int to = a[v][i];
    if (used[to]) continue;
    if (dist[to] == -1) continue;
    if (dfsodd(to)) return true;
  }
  return false;
}
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; ++i) scanf("%d", &vol[i]), vol[i]--;
  for (int i = 0; i < m; ++i) {
    int fr, to;
    scanf("%d%d", &fr, &to);
    fr--;
    to--;
    a[fr].push_back(to);
    a[to].push_back(fr);
  }
  scanf("%d%d", &st, &en);
  st--;
  en--;
  vol[k++] = en;
  int l = -1;
  int r = n + 1;
  while (r - l > 1) {
    int mid = (l + r) >> 1;
    need = mid >> 1;
    for (int i = 0; i < n; ++i) dist[i] = -1;
    queue<int> q;
    for (int i = 0; i < k; ++i) {
      q.push(vol[i]);
      dist[vol[i]] = 0;
    }
    while (!q.empty()) {
      int cur = q.front();
      q.pop();
      if (dist[cur] == need) continue;
      for (int i = 0; i < int((a[cur]).size()); ++i) {
        int to = a[cur][i];
        if (dist[to] == -1) {
          dist[to] = dist[cur] + 1;
          q.push(to);
        }
      }
    }
    for (int i = 0; i < n; ++i) used[i] = 0;
    bool ok = false;
    if ((mid & 1) == 0) {
      if (dfseven(st)) ok = true;
    } else {
      if (dfsodd(st)) ok = true;
    }
    if (ok)
      r = mid;
    else
      l = mid;
  }
  if (r == n + 1) r = -1;
  printf("%d\n", r);
  return 0;
}
