#include <bits/stdc++.h>
using namespace std;
int source, target;
int n, m, k;
vector<int> G[100001];
bool volunteer[100001];
bool solve(int q) {
  queue<int> Q;
  vector<bool> in(n + 1, false);
  Q.push(source);
  in[source] = true;
  vector<int> dist(n + 1, 0);
  dist[source] = q;
  while (Q.size()) {
    int u = Q.front();
    Q.pop();
    in[u] = false;
    for (int i = 0; i < G[u].size(); i++) {
      int v = G[u][i];
      if (v == target) return true;
      int d = dist[u] - 1;
      if (volunteer[v]) d = q;
      if (dist[v] < d) {
        dist[v] = d;
        if (!in[v] && dist[v]) {
          Q.push(v);
          in[v] = true;
        }
      }
    }
  }
  return false;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int v;
    cin >> v;
    volunteer[v] = true;
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  cin >> source >> target;
  int lo = 0, hi = n;
  while (lo + 1 < hi) {
    int mi = (lo + hi) >> 1;
    if (solve(mi))
      hi = mi;
    else
      lo = mi;
  }
  if (hi == n)
    cout << "-1" << endl;
  else
    cout << hi << endl;
  return 0;
}
