#include <bits/stdc++.h>
using namespace std;
struct EDGE {
  int e, nxt;
};
EDGE edge[400005];
int head[100005], idx, n, m, dis[100005];
bool vol[100005], vi[100005];
inline void addedge(int s, int e) {
  edge[idx].e = e;
  edge[idx].nxt = head[s];
  head[s] = idx++;
  edge[idx].e = s;
  edge[idx].nxt = head[e];
  head[e] = idx++;
}
bool check_ok(int q, int s, int t) {
  memset(dis, 0x3f, (n + 1) << 2);
  memset(vi, 0, n + 1);
  queue<int> q1;
  int nxt, p;
  dis[s] = 0;
  q1.push(s);
  while (!q1.empty()) {
    nxt = q1.front();
    q1.pop();
    if (nxt == t) {
      return 1;
    }
    for (p = head[nxt]; p != -1; p = edge[p].nxt) {
      if (dis[nxt] + 1 > q) continue;
      if (vol[edge[p].e]) {
        if (vi[edge[p].e]) continue;
        vi[edge[p].e] = 1;
        dis[edge[p].e] = 0;
        q1.push(edge[p].e);
      } else if (dis[edge[p].e] > dis[nxt] + 1) {
        dis[edge[p].e] = dis[nxt] + 1;
        q1.push(edge[p].e);
      }
    }
  }
  return 0;
}
int main(int argc, char *argv[]) {
  int i, j, k;
  scanf("%d%d%d", &n, &m, &k);
  memset(vol, 0, n + 1);
  memset(head, -1, (n + 1) << 2);
  idx = 0;
  int x;
  while (k--) {
    scanf("%d", &x);
    vol[x] = 1;
  }
  int u, v;
  for (i = 0; i < m; ++i) {
    scanf("%d%d", &u, &v);
    addedge(u, v);
  }
  int s, t, l, r, mid;
  scanf("%d%d", &s, &t);
  r = n, l = 1;
  while (l < r) {
    mid = (l + r) >> 1;
    if (check_ok(mid, s, t))
      r = mid;
    else
      l = mid + 1;
  }
  if (l == n)
    puts("-1");
  else
    printf("%d\n", l);
  return 0;
}
