#include <bits/stdc++.h>
using namespace std;
int n, m, k, p, l, h, z, v[400005], f[100005], o[400005], d[100005], q[100005];
bool x[100005], u[100005];
void bd(int a, int b) {
  v[++p] = b;
  o[p] = f[a];
  f[a] = p;
}
bool chk() {
  for (int i = (1); i <= (n); i++) d[i] = 1e9, u[i] = 0;
  d[k] = 0;
  q[0] = k;
  for (int l = 0, h = 1; l != h; l = ++l % 100005) {
    int y = q[l];
    u[y] = 0;
    if (y == m) return 1;
    if (d[y] == z) continue;
    for (int i = f[y]; i; i = o[i]) {
      int V = v[i];
      if (d[y] + 1 < d[V]) {
        d[V] = x[V] ? 0 : d[y] + 1;
        if (!u[V]) u[V] = 1, q[h++] = V, h %= 100005;
      }
    }
  }
  return 0;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  while (k--) {
    int t;
    scanf("%d", &t);
    x[t] = 1;
  }
  while (m--) {
    int a, b;
    scanf("%d %d", &a, &b);
    bd(a, b);
    bd(b, a);
  }
  scanf("%d %d", &k, &m);
  for (l = 1, h = n; l < h;) {
    z = l + h >> 1;
    if (chk())
      h = z;
    else
      l = z + 1;
  }
  printf("%d\n", h == n ? -1 : h);
  scanf("\n");
}
