#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10, inf = 1e9 + 10;
vector<int> g[MAXN];
bool c[MAXN], mark[MAXN];
int dis[MAXN];
int st, en;
void bfs(int s, int k) {
  queue<int> q;
  q.push(s);
  while (q.size()) {
    int v = q.front();
    q.pop();
    if (c[v]) dis[v] = 0;
    for (int u : g[v]) {
      if (dis[v] != k and dis[u] > dis[v] + 1) {
        mark[u] = true;
        dis[u] = dis[v] + 1;
        q.push(u);
      }
    }
  }
}
bool check(int q) {
  fill(mark, mark + MAXN, 0);
  fill(dis, dis + MAXN, inf);
  bfs(st, q);
  return mark[en];
}
int main() {
  ios::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    x--;
    c[x] = true;
  }
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    v--;
    u--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  cin >> st >> en;
  st--, en--;
  if (!check(n)) {
    cout << -1 << endl;
    return 0;
  }
  int s = 0, e = n;
  while (e - s > 1) {
    int mid = (s + e) / 2;
    if (check(mid))
      e = mid;
    else
      s = mid;
  }
  cout << e << endl;
  return 0;
}
