#include <bits/stdc++.h>
int p[300000];
int cur[300000];
int use[300000];
int find(int i) {
  if (p[i] == i) return i;
  return (p[i] = find(p[i]));
}
void un(int v1, int v2) {
  int p1 = find(v1);
  int p2 = find(v2);
  p[p1] = p2;
}
void solve(int n) {
  int i, k, m, u, minc = 0, maxc = 0, midc, ans = 1, s, t, a, b;
  scanf("%d%d", &m, &k);
  std::vector<std::vector<int>> v(n + m);
  for (i = 0; i < m + n; i++) {
    p[i] = i;
    use[i] = 0;
  }
  for (i = 0; i < k; i++) {
    scanf("%d", &u);
    cur[maxc] = u - 1;
    use[u - 1] = 1;
    maxc++;
  }
  for (i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    v[n + i].push_back(a - 1);
    v[n + i].push_back(b - 1);
    v[a - 1].push_back(n + i);
    v[b - 1].push_back(n + i);
  }
  scanf("%d%d", &s, &t);
  s--;
  t--;
  u = 0;
  for (i = 0; i < k; i++)
    if (cur[i] == t) u = 1;
  if (u == 0) {
    cur[maxc] = t;
    use[t] = 1;
    maxc++;
  }
  midc = maxc;
  while (minc < maxc)
    if (minc == midc) {
      if (find(s) == find(t)) {
        printf("%d\n", ans);
        return;
      } else {
        ans++;
        midc = maxc;
      }
    } else {
      while (minc < midc) {
        for (i = 0; i < v[cur[minc]].size(); i++)
          if (find(cur[minc]) != find(v[cur[minc]][i])) {
            if (use[v[cur[minc]][i]] == 0) {
              cur[maxc] = v[cur[minc]][i];
              use[cur[maxc]] = 1;
              maxc++;
            }
            un(v[cur[minc]][i], cur[minc]);
          }
        minc++;
      }
    }
  printf("-1\n");
}
int main() {
#pragma comment(linker, "/STACK:268435456")
  int n;
  while (scanf("%d", &n) != EOF) {
    solve(n);
  }
  return 0;
}
