#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 100;
vector<int> mat1[MAXN], vol;
bool isVis[MAXN];
int n, m, k, s, t, up[MAXN], dis[MAXN], par[MAXN], h[MAXN];
queue<int> que;
void input() {
  cin >> n >> m >> k;
  for (int i = 0; i < k; ++i) {
    int x;
    cin >> x;
    vol.push_back(x);
  }
  for (int i = 0; i < m; ++i) {
    int v, u;
    cin >> v >> u;
    mat1[v].push_back(u);
    mat1[u].push_back(v);
  }
  cin >> s >> t;
  bool c = false;
  for (int i = 0; i < (int)vol.size(); ++i)
    if (vol[i] == t) {
      c = true;
      break;
    }
  if (!c) vol.push_back(t);
}
void dfs(int v) {
  isVis[v] = true;
  for (int i = 0; i < (int)mat1[v].size(); ++i)
    if (!isVis[mat1[v][i]]) dfs(mat1[v][i]);
}
int find(int v) {
  if (par[v] == v) return v;
  return par[v] = find(par[v]);
}
void merg(int v, int u) { par[find(u)] = find(v); }
void bfs(int q) {
  for (int i = 0; i < vol.size(); ++i) {
    que.push(vol[i]);
    up[vol[i]] = vol[i];
  }
  while (que.size()) {
    int x = que.front();
    ;
    que.pop();
    for (int i = 0; i < (int)mat1[x].size(); ++i)
      if (!up[mat1[x][i]]) {
        up[mat1[x][i]] = up[x];
        dis[mat1[x][i]] = dis[x] + 1;
        que.push(mat1[x][i]);
      } else {
        if (dis[x] + 1 + dis[mat1[x][i]] <= q) {
          merg(up[x], up[mat1[x][i]]);
        }
        if (dis[x] + 1 < dis[mat1[x][i]]) {
          dis[mat1[x][i]] = dis[x] + 1;
          up[mat1[x][i]] = up[x];
        }
      }
  }
}
bool f(int q) {
  ;
  memset(up, 0, sizeof(up));
  memset(dis, 0, sizeof(dis));
  memset(h, 0, sizeof(h));
  for (int i = 0; i < MAXN; ++i) par[i] = i;
  bfs(q);
  return find(s) == find(t);
}
int bin_search(int s, int e, int d = 0) {
  if (d > 100) return 0;
  if (s == e - 1) return e;
  int mid = (s + e) / 2;
  if (f(mid)) return bin_search(s, mid, d + 1);
  return bin_search(mid, e, d + 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  input();
  dfs(s);
  if (!isVis[t]) {
    cout << -1 << endl;
    return 0;
  }
  cout << bin_search(0, n) << endl;
  return 0;
}
