#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool vol[100010];
vector<int> g[100010];
int dist[100010];
int src, source;
bool SPFA(int mid) {
  for (int i = 1; i <= n; i++) dist[i] = 0x3f3f3f3f;
  dist[src] = 0;
  priority_queue<pair<int, int> > q;
  q.push(make_pair(0, src));
  while (!q.empty()) {
    int v = q.top().second;
    int resp = -q.top().first;
    q.pop();
    if (v == source) return true;
    if (resp == mid) continue;
    if (resp > dist[v]) continue;
    for (int i = 0; i < int(g[v].size()); i++) {
      int a = g[v][i];
      if (dist[a] <= resp + 1) continue;
      if (vol[a]) {
        dist[a] = 0;
        q.push(make_pair(0, a));
      } else {
        dist[a] = resp + 1;
        q.push(make_pair(-dist[a], a));
      }
    }
  }
  return false;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int a;
    cin >> a;
    vol[a] = true;
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  cin >> src >> source;
  int i = 1;
  int f = n + 1;
  while (i != f) {
    int u = (i + f) / 2;
    if (SPFA(u))
      f = u;
    else
      i = u + 1;
  }
  if (i == n + 1)
    cout << -1;
  else
    cout << i;
}
