#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 20;
int n, m, k, s, t, disp[maxn], papa[maxn];
bool vl[maxn], vis[maxn];
vector<int> adj[maxn];
queue<int> tea;
void input();
void bfs_2(int);
void bfs_1(int);
int bssearch();
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  input();
  cout << bssearch() << endl;
  return 0;
}
void input() {
  int u, v;
  cin >> n >> m >> k;
  while (k--) cin >> u, vl[u] = 1;
  while (m--) cin >> u >> v, adj[u].push_back(v), adj[v].push_back(u);
  cin >> s >> t;
  vl[t] = 1;
}
int bssearch() {
  bool z = 0;
  int l = 0, r = n, mid;
  while (r - l - 1) {
    mid = (l + r) / 2;
    bfs_1(mid);
    vis[t] ? r = mid, z = 1 : l = mid;
  }
  if (z) return r;
  return -1;
}
void bfs_2(int mem) {
  for (int i = 1; i <= n; i++) {
    if (vl[i])
      disp[i] = 0, papa[i] = i, vis[i] = 1, tea.push(i);
    else
      disp[i] = n + 1, papa[i] = 0, vis[i] = 0;
  }
  while (tea.size()) {
    int v = tea.front();
    tea.pop();
    for (int u : adj[v])
      if (!vis[u] && disp[v] < mem)
        vis[u] = 1, papa[u] = papa[v], disp[u] = disp[v] + 1, tea.push(u);
  }
  memset(vis, 0, sizeof(vis));
}
void bfs_1(int mem) {
  bfs_2(mem);
  vis[s] = 1;
  tea.push(s);
  while (tea.size()) {
    int v = tea.front();
    tea.pop();
    for (int u : adj[v])
      if (!vis[u]) {
        if (papa[u] == s)
          vis[u] = 1, tea.push(u);
        else if (disp[u] + disp[v] < mem)
          papa[u] = s, vis[u] = 1, tea.push(u);
      }
  }
}
