#include <bits/stdc++.h>
using namespace std;
const int inf = 1e8;
const int nax = 1e5 + 200;
const double pi = acos(-1);
const double eps = 1e-10;
vector<int> g[nax];
bool vol[nax];
int dist[nax];
int n;
int maxi[nax];
int p[nax];
void solve(int s, int t) {
  for (int i = 1; i <= (int)n; ++i) {
    dist[i] = inf;
    maxi[i] = inf;
  }
  priority_queue<tuple<int, int, int>, vector<tuple<int, int, int>>,
                 greater<tuple<int, int, int>>>
      q;
  q.push({0, 0, s});
  dist[s] = 0;
  maxi[s] = 0;
  while (!q.empty()) {
    int d, u, m;
    tie(m, d, u) = q.top();
    q.pop();
    for (int v : g[u]) {
      int w = dist[u];
      if (vol[u]) {
        w = 1;
      } else {
        w++;
      }
      if (maxi[v] != inf && maxi[u] > maxi[v] && (vol[v] || v == t)) {
        continue;
      }
      m = max(m, w);
      if (maxi[v] > m || (maxi[v] <= m && dist[v] > w)) {
        dist[v] = w;
        maxi[v] = m;
        q.push({m, w, v});
      }
    }
  }
  if (maxi[t] != inf) {
    cout << maxi[t] << '\n';
  } else {
    cout << -1 << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(20) << fixed;
  int m, k;
  cin >> n >> m >> k;
  int u;
  for (int i = 0; i < (int)k; ++i) {
    cin >> u;
    vol[u] = true;
  }
  int v;
  for (int i = 0; i < (int)m; ++i) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int s, t;
  cin >> s >> t;
  solve(s, t);
}
