#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 1e5 + 5;
vector<int> g[maxn];
int mag[maxn];
int used[maxn];
queue<pair<int, int> > z;
int term(int x, int q, int o) {
  if (mag[x])
    return q;
  else
    return o - 1;
}
bool gen(int q, int s, int t) {
  memset(used, 0, sizeof used);
  pair<int, int> o;
  z.push(make_pair(s, q + 1));
  used[s] = q + 1;
  while (!z.empty()) {
    o = z.front();
    z.pop();
    if (o.second > 1)
      for (int i = 0; i < g[o.first].size(); i++) {
        if ((used[g[o.first][i]] <
             ((mag[g[o.first][i]]) ? q + 1 : o.second - 1)) ||
            (used[g[o.first][i]] == 0)) {
          if (mag[g[o.first][i]])
            z.push(make_pair(g[o.first][i], q + 1)),
                used[g[o.first][i]] = q + 1;
          else
            z.push(make_pair(g[o.first][i], o.second - 1)),
                used[g[o.first][i]] = o.second - 1;
        }
      }
  }
  if (used[t] > 0)
    return true;
  else
    return false;
}
int main() {
  int n, m;
  cin >> n >> m;
  int k;
  int x;
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> x;
    mag[x] = 1;
  }
  int v, u;
  for (int i = 0; i < m; i++) {
    cin >> v >> u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  int s, t;
  cin >> s >> t;
  int l = 0, r = n + 5;
  while ((r - l) > 5) {
    m = (l + r) / 2;
    if (gen(m, s, t))
      r = m;
    else
      l = m + 1;
  }
  for (int i = l; i <= r; i++) {
    if (gen(i, s, t)) {
      cout << i << endl;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
