#include <bits/stdc++.h>
using namespace std;
int n, m, k, s, t, d[(101 * 1000)];
bool blue[(101 * 1000)];
vector<int> e[(101 * 1000)];
bool check(int q) {
  set<pair<int, int> > st;
  for (int i = 0; i < (101 * 1000); i++) d[i] = ((int)1e9);
  d[s] = 0;
  st.insert({d[s], s});
  while (st.size()) {
    int x = st.begin()->second;
    st.erase(st.begin());
    if (x == t) return 1;
    for (int i = 0; i < e[x].size(); i++)
      if ((d[e[x][i]] > d[x] + 1 || (blue[e[x][i]] && d[e[x][i]])) &&
          d[x] + 1 <= q)
        st.erase({d[e[x][i]], e[x][i]}),
            d[e[x][i]] = ((blue[e[x][i]]) ? 0 : d[x] + 1),
            st.insert({d[e[x][i]], e[x][i]});
  }
  return 0;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    int v;
    scanf("%d", &v);
    blue[v] = 1;
  }
  for (int i = 0; i < m; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    e[v].push_back(u);
    e[u].push_back(v);
  }
  scanf("%d%d", &s, &t);
  int l = 0, r = (101 * 1000);
  while (l < r - 1) {
    int mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%d", ((r == (101 * 1000)) ? -1 : r));
  return 0;
}
