#include <bits/stdc++.h>
using namespace std;
struct path {
  int pointat, prev, from;
};
int low[444444], h[444444];
bool f[444444], chot[444444];
int n, m, ncount = 0, edge = 0, k, start, finish;
path e[888888];
vector<int> pq, st;
void setlink(int u, int v) {
  edge++;
  e[edge].pointat = v;
  e[edge].prev = h[u];
  h[u] = edge;
  e[edge].from = u;
}
int found(int x) {
  if (low[x] <= 0)
    return x;
  else {
    low[x] = found(low[x]);
    return low[x];
  }
}
void lienket(int u, int v) {
  if (low[u] < low[v])
    low[v] = u;
  else {
    if (low[u] == low[v]) low[v]--;
    low[u] = v;
  }
}
void add(int i) {
  int we = h[i];
  f[i] = false;
  while (we) {
    pq.push_back(we);
    we = e[we].prev;
  }
}
void solve(int limit) {
  memset(low, 0, sizeof(low));
  ncount = 0;
  memset(f, true, sizeof(f));
  st.clear();
  pq.clear();
  for (int i = 1; i <= n; i++)
    if (f[i])
      if (chot[i]) add(i);
  swap(pq, st);
  int we, v, u;
  while (found(start) != found(finish)) {
    pq.clear();
    ncount++;
    if (ncount > limit) break;
    if (st.empty()) {
      ncount = -1;
      return;
    }
    while (!st.empty()) {
      we = st.back();
      st.pop_back();
      u = e[we].from;
      v = e[we].pointat;
      u = found(u);
      v = found(v);
      if (u != v) lienket(u, v);
      if (f[e[we].from]) add(e[we].from);
      if (f[e[we].pointat]) add(e[we].pointat);
    }
    swap(pq, st);
  }
}
int main() {
  cin >> n >> m >> k;
  memset(chot, false, sizeof(chot));
  int x, u, v;
  for (int i = 1; i <= k; i++) scanf("%d", &x), chot[x] = true;
  edge = 0;
  memset(h, 0, sizeof(h));
  for (int i = 1; i <= m; i++)
    scanf("%d%d", &u, &v), setlink(u, v), setlink(v, u);
  scanf("%d%d", &start, &finish);
  chot[finish] = true;
  solve(1000000000);
  if (ncount == -1) {
    cout << -1;
    return 0;
  }
  int ans = ncount * 2;
  solve(ncount - 1);
  for (int i = 1; i <= edge; i++) {
    u = e[i].pointat;
    v = e[i].from;
    if (f[u]) continue;
    if (f[v]) continue;
    u = found(u);
    v = found(v);
    if (u != v) lienket(u, v);
  }
  if (found(start) == found(finish)) ans--;
  cout << ans;
  return 0;
}
