#include <bits/stdc++.h>
using namespace std;
int const N = 1e5;
int n, m, k, f[N], nxt[N], pre[N], s, t, st, dt[N], realP[N], p[N], sz[N], tim,
    dist[N];
vector<pair<int, int>> from[N], tr[N];
deque<int> q[N];
vector<int> d[N];
void goDt() {
  deque<int> q;
  q.push_back(t);
  while (q.size()) {
    int cur = q.front();
    q.pop_front();
    for (int i = 0; i < d[cur].size(); ++i) {
      if (d[cur][i] != t && dt[d[cur][i]] == 0) {
        dt[d[cur][i]] = dt[cur] + 1;
        q.push_back(d[cur][i]);
      }
    }
  }
}
int find(int v) {
  if (p[v] == v) return v;
  return p[v] = find(p[v]);
}
void uni(int a, int b) {
  a = find(a);
  b = find(b);
  if (a != b) {
    if (sz[a] < sz[b]) swap(a, b);
    p[b] = a;
    if (sz[a] == sz[b]) ++sz[a];
  }
}
void remove(int id) {
  if (pre[id] != -1) nxt[pre[id]] = nxt[id];
  if (nxt[id] != -1) pre[nxt[id]] = pre[id];
}
void go() {
  int cur = st;
  while (cur != -1) {
    while (q[cur].size() && dist[q[cur].front()] == tim) {
      int cur_ver = q[cur].front();
      q[cur].pop_front();
      for (int i = 0; i < d[cur_ver].size(); ++i) {
        int to = d[cur_ver][i];
        if (realP[to] == -1) {
          uni(cur_ver, to);
          realP[to] = realP[cur_ver];
          dist[to] = dist[cur_ver] + 1;
          q[cur].push_back(to);
        } else {
          int cur_par = find(cur_ver);
          int to_par = find(to);
          if (to_par != cur_par) {
            int cost = dist[to] + dist[cur_ver] + 1;
            from[cost].push_back(make_pair(realP[cur_ver], realP[to]));
          }
        }
      }
    }
    cur = nxt[cur];
  }
  cur = st;
  while (cur != -1) {
    if (q[cur].size() == 0) {
      remove(cur);
      if (cur == st) st = nxt[st];
    }
    cur = nxt[cur];
  }
}
void ref() {
  while (from[tim * 2 + 1].size()) {
    pair<int, int> cur_edge = from[tim * 2 + 1].back();
    from[tim * 2 + 1].pop_back();
    int pa = find(cur_edge.first);
    int pb = find(cur_edge.second);
    if (pa != pb) {
      uni(pa, pb);
      tr[realP[cur_edge.first]].push_back(
          make_pair(tim * 2 + 1, realP[cur_edge.second]));
      tr[realP[cur_edge.second]].push_back(
          make_pair(tim * 2 + 1, realP[cur_edge.first]));
    }
  }
  while (from[tim * 2 + 2].size()) {
    pair<int, int> cur_edge = from[tim * 2 + 2].back();
    from[tim * 2 + 2].pop_back();
    int pa = find(cur_edge.first);
    int pb = find(cur_edge.second);
    if (pa != pb) {
      uni(pa, pb);
      tr[realP[cur_edge.first]].push_back(
          make_pair(tim * 2 + 2, realP[cur_edge.second]));
      tr[realP[cur_edge.second]].push_back(
          make_pair(tim * 2 + 2, realP[cur_edge.first]));
    }
  }
}
int goDp(int v, int p, int cur) {
  int r = max(cur, dt[v]);
  for (int i = 0; i < tr[v].size(); ++i) {
    if (tr[v][i].second != p)
      r = min(r, goDp(tr[v][i].second, v, max(cur, tr[v][i].first)));
  }
  return r;
}
void clear() {
  for (int i = 0; i < N; ++i) {
    f[i] = nxt[i] = pre[i] = dt[i] = realP[i] = p[i] = sz[i] = dist[i] = tim =
        st = 0;
    q[i].clear();
    from[i].clear();
    tr[i].clear();
    d[i].clear();
  }
}
int main() {
  while (scanf("%d%d%d", &n, &m, &k) != EOF) {
    clear();
    for (int i = 0; i < k; ++i) {
      int v;
      scanf("%d", &v);
      --v;
      f[v] = 1;
    }
    for (int i = 0; i < m; ++i) {
      int fr, to;
      scanf("%d%d", &fr, &to);
      --fr;
      --to;
      d[fr].push_back(to);
      d[to].push_back(fr);
    }
    scanf("%d%d", &s, &t);
    --s;
    --t;
    f[t] = 0;
    st = -1;
    goDt();
    int prev = -1;
    for (int i = 0; i < n; ++i) {
      p[i] = i;
      if (f[i]) {
        realP[i] = i;
        nxt[i] = -1;
        pre[i] = prev;
        if (prev != -1) nxt[prev] = i;
        prev = i;
        q[i].push_back(i);
        if (st == -1) st = i;
      } else
        realP[i] = -1;
    }
    while (st != -1) {
      go();
      ref();
      ++tim;
    }
    int ans = goDp(s, s, 0);
    if (ans == 0)
      printf("-1\n");
    else
      printf("%d\n", ans);
  }
  return 0;
}
