#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << H;
  debug_out(T...);
}
const int INF = 0x3f3f3f3f, m197 = (int)1e9 + 7;
void s_solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<int>> e(n + 1);
  vector<int> st(n + 1), vis(n + 1);
  for (int i = 1; i <= k; ++i) {
    int x;
    cin >> x;
    st[x] = true;
  }
  for (int i = 1; i <= m; ++i) {
    int a, b;
    cin >> a >> b;
    e[a].push_back(b);
    e[b].push_back(a);
  }
  int S, T;
  cin >> S >> T;
  int l = 0, r = n + 1;
  while (l < r) {
    int mid = l + r >> 1;
    bool ok = false;
    queue<pair<int, int>> q;
    q.push({S, 0});
    fill(vis.begin(), vis.end(), INF);
    vis[S] = 0;
    while (q.size()) {
      auto t = q.front();
      q.pop();
      if (t.first == T) {
        ok = true;
        break;
      }
      if (t.second == mid) continue;
      for (int i = 0; i < (int)e[t.first].size(); ++i) {
        int j = e[t.first][i];
        int tt = (st[j] ? 0 : t.second + 1);
        if (vis[j] <= tt || tt > mid) continue;
        vis[j] = tt;
        q.push({j, tt});
      }
    }
    if (ok)
      r = mid;
    else
      l = mid + 1;
  }
  if (l == n + 1) l = -1;
  cout << l << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(10);
  int _T = 1, _C = 1;
  while (_C++ <= _T) {
    s_solve();
  }
  return 0;
}
