#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:250000000");
const int MN = 3000 * 100 + 10;
const int inf = 2000 * 100 * 10;
bool vol[MN], used_vol[MN], good, used[MN];
vector<int> g[MN];
int n, m, k, dp[MN];
int s, t;
void can(int v) {
  used[v] = true;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (!used[to]) can(to);
  }
}
bool f(int mx) {
  priority_queue<pair<int, int> > h;
  h.push(make_pair(0, s));
  fill(&dp[0], &dp[0] + n, inf + 10);
  fill(&used_vol[0], &used_vol[0] + n, false);
  dp[s] = 0;
  if (vol[s]) used_vol[s] = true;
  while (!h.empty()) {
    int v = h.top().second;
    int d = -h.top().first;
    h.pop();
    if (d > dp[v] || d > mx) continue;
    if (v == t) return true;
    for (int i = 0; i < g[v].size(); i++) {
      int to = g[v][i];
      if (vol[to] && used_vol[to]) continue;
      int nw = (vol[v] ? 0 : dp[v]) + 1;
      if (nw < dp[to] && nw <= mx) {
        dp[to] = nw;
        h.push(make_pair(-nw, to));
      }
    }
  }
  return false;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    int x;
    scanf("%d", &x);
    x--;
    vol[x] = true;
  }
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--, y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 0; i < n; i++) random_shuffle(g[i].begin(), g[i].end());
  scanf("%d%d", &s, &t);
  s--, t--;
  can(s);
  if (!used[t]) {
    cout << "-1\n";
    return 0;
  }
  int lf = 1, rg = inf;
  int ans = rg;
  while (lf <= rg) {
    int mid = (lf + rg) / 2;
    if (f(mid)) {
      ans = min(ans, mid);
      rg = mid - 1;
    } else
      lf = mid + 1;
  }
  cout << ans << endl;
  return 0;
}
