#include <bits/stdc++.h>
using namespace std;
const int M = 100100;
int n, m, k, f[M], s, e, l = 1, h = M, w[M];
vector<int> g[M];
int test(long long t) {
  memset(w, 0, sizeof(w));
  priority_queue<long long> q;
  q.push((t << 20) + s);
  w[s] = t;
  while (!q.empty()) {
    long long a = q.top(), b = a & 0xfffff;
    a >>= 20;
    q.pop();
    if (a < w[b]) continue;
    for (vector<int>::iterator it = g[b].begin(); it != g[b].end(); ++it) {
      if (*it == e) return 1;
      long long x = f[*it] ? t : (a - 1);
      if (x > w[*it]) w[*it] = x, q.push((x << 20) + *it);
    }
  }
  return 0;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0, j; i < k && cin >> j; ++i) f[j] = 1;
  for (int i = 0, a, b; i < m && cin >> a >> b; ++i)
    g[a].push_back(b), g[b].push_back(a);
  cin >> s >> e;
  while (l < h) {
    int t = l + h >> 1;
    if (test(t))
      h = t;
    else
      l = t + 1;
  }
  cout << (l > n ? -1 : l) << endl;
}
