#include <bits/stdc++.h>
using namespace std;
const int N = 300050;
vector<int> e[N];
int f[N], s, t, n;
int que[N], l, r, dis[N], source[N];
inline int find(int x) { return f[x] == x ? x : (f[x] = find(f[x])); }
bool expand() {
  int cr = r;
  while (l != cr) {
    int x = que[++l];
    for (__typeof(e[x].begin()) it = e[x].begin(); it != e[x].end(); ++it)
      if (dis[*it] > dis[x] + 1)
        dis[que[++r] = *it] = dis[x] + 1, source[*it] = source[x];
      else if (dis[*it] == dis[x] + 1)
        f[find(source[*it])] = find(source[x]);
  }
  if (l >= r) {
    printf("-1\n");
    exit(0);
  }
  return find(s) == find(t);
}
int main() {
  int m, ts, a;
  scanf("%d%d%d", &n, &m, &ts);
  while (ts--) scanf("%d", &a), que[++r] = a, source[a] = a;
  for (int i = 1, a, b; i <= m; ++i) {
    scanf("%d%d", &a, &b);
    e[a].push_back(n + i);
    e[n + i].push_back(a);
    e[n + i].push_back(b);
    e[b].push_back(n + i);
  }
  scanf("%d%d", &s, &t);
  if (source[t] != t) source[t] = t, que[++r] = t;
  memset(dis, 0x3f, sizeof dis);
  for (int i = 1; i <= r; ++i) dis[que[i]] = 0;
  for (int i = 1; i <= n + m; ++i) f[i] = i;
  if (s == t)
    puts("0");
  else {
    int res(1), t(0);
    while (!expand()) ++res;
    printf("%d\n", res);
  }
}
