#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, INF = 1e9;
bool mark[N];
vector<int> adj[N], g[N];
int n, m, k, s, t;
int d[N], st, en, que[N];
bool vis[N];
void dfs(int v) {
  vis[v] = true;
  for (auto u : g[v])
    if (!vis[u]) dfs(u);
}
bool check(int q) {
  st = en = 0;
  for (int i = 1; i <= n; i++) d[i] = INF;
  for (int i = 1; i <= n; i++) {
    if (mark[i]) d[i] = 0, que[en++] = i;
  }
  while (en - st > 0) {
    int v = que[st++];
    for (auto u : adj[v]) {
      if (d[u] == INF) {
        d[u] = d[v] + 1;
        que[en++] = u;
      }
    }
  }
  for (int i = 1; i <= n; i++) g[i].clear();
  for (int v = 1; v <= n; v++)
    for (auto u : adj[v])
      if (d[u] + d[v] <= q - 1) g[v].push_back(u);
  memset(vis, 0, sizeof vis);
  dfs(s);
  return vis[t];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int v;
    cin >> v;
    mark[v] = true;
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  cin >> s >> t;
  mark[t] = true;
  if (s == t) return cout << 0 << endl, 0;
  int lo = 0, hi = n;
  while (hi - lo > 1) {
    int mid = (lo + hi) / 2;
    if (check(mid))
      hi = mid;
    else
      lo = mid;
  }
  if (hi == n) return cout << -1 << endl, 0;
  return cout << hi << endl, 0;
}
