#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
bool sp[maxn];
vector<int> g[maxn];
int a[maxn];
int s, t, n;
bool reachable(int qq) {
  if (qq == 0) return false;
  int i, y;
  priority_queue<pair<int, int> > q;
  for (i = 0; i < n; i++) a[i] = -1;
  a[s] = 0;
  q.push(make_pair(0, s));
  while (!q.empty()) {
    int x = q.top().second;
    int d = -q.top().first;
    q.pop();
    if (d > a[x]) continue;
    for (i = 0; i < ((int)g[x].size()); i++) {
      y = g[x][i];
      if (a[y] == -1 || a[y] > d + 1) {
        if (y == t) return true;
        a[y] = d + 1;
        if (sp[y]) a[y] = 0;
        if (a[y] < qq) q.push(make_pair(-a[y], y));
      }
    }
  }
  if (a[t] == -1) return false;
  return true;
}
int main(void) {
  int m, k, x, y, i;
  cin >> n >> m >> k;
  memset(sp, 0, sizeof(sp));
  for (i = 0; i < k; i++) {
    cin >> x;
    sp[x - 1] = 1;
  }
  for (i = 0; i < m; i++) {
    cin >> x >> y;
    x--;
    y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  cin >> s >> t;
  s--;
  t--;
  int l = 0, r = n + 1;
  while (l < r) {
    int mid = (l + r) / 2;
    if (reachable(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (l == n + 1) {
    cout << -1 << endl;
    return 0;
  }
  cout << l << endl;
}
