#include <bits/stdc++.h>
using namespace std;
struct nodo {
  int x, p;
  bool operator<(const nodo& a) const { return a.p > p; }
};
int N, M, K, rnd, S, T;
int to[200005];
queue<int> q;
vector<int> ady[200005];
int vis[200005];
bool can(int mx) {
  rnd++;
  priority_queue<nodo> q;
  q.push({S, mx});
  while (!q.empty()) {
    nodo act = q.top();
    q.pop();
    if (vis[act.x] == rnd) continue;
    vis[act.x] = rnd;
    if (act.x == T) return 1;
    for (auto v : ady[act.x]) {
      nodo sig;
      sig.x = v;
      int p = act.p - 1;
      if (p >= to[v]) p = max(p, mx - to[v]);
      sig.p = p;
      if (p < 0 or vis[sig.x] == rnd) continue;
      q.push(sig);
    }
  }
  return 0;
}
void fillTo() {
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    for (auto v : ady[x])
      if (to[x] + 1 < to[v]) {
        to[v] = to[x] + 1;
        q.push(v);
      }
  }
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> N >> M >> K;
  for (int i = 1; i <= N; i++) to[i] = 1e9;
  for (int i = 1; i <= K; i++) {
    int x;
    cin >> x;
    q.push(x);
    to[x] = 0;
  }
  while (M--) {
    int u, v;
    cin >> u >> v;
    ady[u].push_back(v);
    ady[v].push_back(u);
  }
  cin >> S >> T;
  fillTo();
  int ini = 1;
  int fin = 200001;
  while (ini < fin) {
    int mid = (ini + fin) / 2;
    if (can(mid))
      fin = mid;
    else
      ini = mid + 1;
  }
  if (can(ini))
    cout << ini << "\n";
  else
    cout << "-1\n";
  return 0;
}
