#include <bits/stdc++.h>
using namespace std;
const int inf = 199999;
struct edge {
  int to, nextID;
} E[400005];
int n, m, k, ne, s, f, LE[100005], d[100005];
bool fr[100005], isGuarded[100005];
void add(int u, int v) {
  E[++ne].to = v;
  E[ne].nextID = LE[u];
  LE[u] = ne;
}
bool ok(int val) {
  for (int i = 1; i <= n; i++) {
    d[i] = inf;
    fr[i] = true;
  }
  queue<int> q;
  q.push(s);
  d[s] = 0;
  fr[s] = false;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int ID = LE[u]; ID != -1; ID = E[ID].nextID) {
      int v = E[ID].to, nDist = d[u] + 1;
      if (nDist > val) continue;
      if (isGuarded[v]) nDist = 0;
      if (d[v] > nDist) {
        d[v] = nDist;
        if (v == f) return true;
        q.push(v);
      }
    }
  }
  return false;
}
int solve() {
  int left = 0, right = inf;
  while (left + 1 < right) {
    int mid = (left + right) / 2;
    if (ok(mid))
      right = mid;
    else
      left = mid;
  }
  return right;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  memset(LE, -1, sizeof(LE));
  for (int i = 1; i <= k; i++) {
    int u;
    scanf("%d", &u);
    isGuarded[u] = true;
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    add(u, v);
    add(v, u);
  }
  scanf("%d %d", &s, &f);
  int ans = solve();
  printf("%d\n", ans == inf ? -1 : ans);
  return 0;
}
