#include <bits/stdc++.h>
using namespace std;
bool good[100500];
const int inf = 1000000000;
set<pair<int, int>> s;
vector<vector<int>> a;
int st, fin, n;
vector<int> d;
bool vis[1000500];
bool can(int q) {
  int v, dd;
  s.clear();
  s.insert(make_pair(0, st));
  d.assign(n, inf);
  d[st] = 0;
  memset(vis, false, sizeof(vis));
  vis[st] = true;
  while (!s.empty()) {
    v = s.begin()->second;
    s.erase(s.begin());
    if (d[v] == q) break;
    for (int i = 0; i < a[v].size(); i++) {
      if (a[v][i] == fin) return true;
      if (good[a[v][i]] && !vis[a[v][i]]) {
        vis[a[v][i]] = true;
        s.erase(make_pair(d[a[v][i]], a[v][i]));
        d[a[v][i]] = 0;
        s.insert(make_pair(d[a[v][i]], a[v][i]));
      } else if (d[v] + 1 < d[a[v][i]]) {
        s.erase(make_pair(d[a[v][i]], a[v][i]));
        d[a[v][i]] = d[v] + 1;
        s.insert(make_pair(d[v] + 1, a[v][i]));
      }
    }
  }
  return false;
}
int main() {
  int m, k, cur;
  cin >> n >> m >> k;
  memset(good, false, sizeof(good));
  for (int i = 0; i < k; i++) {
    scanf("%d", &cur);
    cur--;
    good[cur] = true;
  }
  a.resize(n);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &st, &fin);
    st--;
    fin--;
    a[st].push_back(fin);
    a[fin].push_back(st);
  }
  scanf("%d%d", &st, &fin);
  st--;
  fin--;
  int left = 1;
  int right = m;
  int q;
  while (left < right) {
    q = (left + right) / 2;
    if (can(q))
      right = q;
    else
      left = q + 1;
  }
  if (can(left))
    cout << left << endl;
  else
    cout << -1 << endl;
  return 0;
}
