#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
long long mod = 1000000007;
template <class T>
inline T mod_v(T num) {
  if (num >= 0)
    return num % mod;
  else
    return (num % mod + mod) % mod;
}
template <class T>
T fast_pow(T n, T p) {
  if (p == 0) return 1;
  if (p % 2) {
    T g = mod_v(mod_v(n) * mod_v(fast_pow(n, p - 1)));
    return g;
  } else {
    T g = fast_pow(n, p / 2);
    g = mod_v(mod_v(g) * mod_v(g));
    return g;
  }
}
template <class T>
inline T modInverse(T n) {
  return fast_pow(n, mod - 2);
}
const int mxn = 111111;
int n, m, k;
bool vol[mxn];
vector<int> edges[mxn];
int source, sink;
int dis[mxn];
queue<int> q;
void process(int p, int qq) {
  int d = dis[p];
  if (d <= 0) return;
  for (auto v : edges[p]) {
    if (dis[v] < d - 1) {
      dis[v] = d - 1;
      q.push(v);
      if (vol[v]) {
        dis[v] = qq;
      }
    }
  }
}
bool dijkstra(int p) {
  memset(dis, -1, sizeof dis);
  dis[source] = p;
  while (!q.empty()) q.pop();
  q.push(source);
  while (!q.empty()) {
    process(q.front(), p);
    q.pop();
  }
  return dis[sink] != -1;
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 0, first; i < k; i++) {
    scanf("%d", &first);
    vol[first] = 1;
  }
  for (int i = 0, u, v; i < m; i++) {
    scanf("%d %d", &u, &v);
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  scanf("%d %d", &source, &sink);
  int lo = 1, hi = n;
  int ans = n + 1;
  while (lo <= hi) {
    int mid = (lo + hi) / 2;
    if (dijkstra(mid)) {
      ans = mid;
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  if (ans == (n + 1))
    printf("-1\n");
  else
    printf("%d\n", ans);
  return 0;
}
