#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 100;
vector<int> Matrix[MAXN], Vul;
queue<pair<int, pair<int, int> > > Se;
int n, m, k, t1, t2, st, en, Color[MAXN], par[MAXN], PP[MAXN];
int root(int a) {
  if (par[a] == a) return a;
  par[a] = root(par[a]);
  return par[a];
}
void merge(int a, int b) {
  a = root(a);
  b = root(b);
  par[b] = par[a];
}
int qis;
void BFS(int V, int P, int Dis) {
  if (Color[V] == -1) {
    Color[V] = Dis;
    PP[V] = P;
    for (int i = 0; i < Matrix[V].size(); i++)
      if (PP[Matrix[V][i]] == -1)
        Se.push(make_pair(Dis + 1, make_pair(P, Matrix[V][i])));
  } else {
    if (Color[V] + Dis <= qis) merge(P, PP[V]);
  }
}
bool check(int q) {
  qis = q;
  for (int i = 0; i <= n; i++) {
    par[i] = i;
    Color[i] = -1;
    PP[i] = -1;
  }
  Se.push(make_pair(0, make_pair(en, en)));
  for (int i = 0; i < Vul.size(); i++)
    Se.push(make_pair(0, make_pair(Vul[i], Vul[i])));
  while (Se.size() != 0) {
    BFS(Se.front().second.second, Se.front().second.first, Se.front().first);
    Se.pop();
  }
  if (root(en) == root(st))
    return true;
  else
    return false;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    cin >> t1;
    Vul.push_back(t1);
  }
  for (int i = 0; i < m; i++) {
    cin >> t1 >> t2;
    Matrix[t1].push_back(t2);
    Matrix[t2].push_back(t1);
  }
  cin >> st >> en;
  bool on = false;
  int s = 0, e = n + 1;
  while (s + 1 != e) {
    int m = (s + e) / 2;
    if (check(m)) {
      e = m;
      on = true;
    } else
      s = m;
  }
  if (!on)
    cout << -1;
  else
    cout << e;
}
