#include <bits/stdc++.h>
int n, m, K, dis[200005], inq[200005], q[4 * 200005], S, T, ans;
int son[200005], next[2 * 200005], ed[2 * 200005], d[200005], cnt;
bool SPFA(int p) {
  for (int i = 1; i <= n; i++) dis[i] = (1 << 29), inq[i] = 0;
  int st = 0, en = 0;
  q[++en] = S;
  dis[S] = 0;
  while (st < en) {
    int u = q[++st];
    inq[u] = 0;
    for (int i = son[u]; i; i = next[i]) {
      int v = ed[i];
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        if (dis[v] > p) continue;
        if (d[v]) dis[v] = 0;
        if (v == T) {
          return 1;
        }
        if (!inq[v]) inq[v] = 1, q[++en] = v;
      }
    }
  }
  return 0;
}
void link(int x, int y) {
  next[++cnt] = son[x];
  son[x] = cnt;
  ed[cnt] = y;
}
int main() {
  scanf("%d%d%d", &n, &m, &K);
  for (int i = 1; i <= K; i++) {
    int x;
    scanf("%d", &x);
    d[x] = 1;
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    link(u, v);
    link(v, u);
  }
  scanf("%d%d", &S, &T);
  if (!d[S]) {
    printf("-1\n");
    return 0;
  }
  ans = -1;
  int l = 0, r = n;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (SPFA(mid))
      r = mid - 1, ans = mid;
    else
      l = mid + 1;
  }
  printf("%d\n", ans);
}
