#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  int n;
  int m;
  int k;
  cin >> n;
  cin >> m;
  cin >> k;
  bool a[200001];
  memset(a, 0, sizeof(a));
  int idx;
  for (int i = 0; i < k; ++i) {
    cin >> idx;
    a[idx] = true;
  }
  vector<int> b[200001];
  int v1;
  int v2;
  for (int i = 0; i < m; ++i) {
    cin >> v1;
    cin >> v2;
    b[v1].push_back(v2);
    b[v2].push_back(v1);
  }
  int s;
  int t;
  cin >> s;
  cin >> t;
  a[t] = true;
  int dist[200001];
  memset(dist, 0, sizeof(dist));
  int dsVal = 1;
  vector<int> ver;
  vector<int> ver2;
  ver.push_back(s);
  dist[s] = 1;
  while (!ver.empty()) {
    for (int i = 0; i < ver.size(); ++i) {
      int vid = ver[i];
      for (int j = 0; j < b[vid].size(); ++j) {
        int vid2 = b[vid][j];
        if (dist[vid2] == 0) {
          dist[vid2] = dsVal;
          ver2.push_back(vid2);
        }
      }
    }
    ver.swap(ver2);
    ver2.clear();
    ++dsVal;
  }
  if (dist[t] == 0) {
    cout << -1;
    return 0;
  }
  int li = 1;
  int ri = dist[t];
  vector<int> ds;
  vector<int> ds2;
  while (li < ri) {
    int idx = (li + ri) / 2;
    int q = idx;
    ver.clear();
    ver2.clear();
    ds.clear();
    ds2.clear();
    memset(dist, 0, sizeof(dist));
    ver.push_back(s);
    ds.push_back(1);
    dist[s] = 1;
    int bDone = false;
    while (!ver.empty()) {
      for (int i = 0; i < ver.size(); ++i) {
        int vid = ver[i];
        for (int j = 0; j < b[vid].size(); ++j) {
          int vid2 = b[vid][j];
          int distVal = ds[i];
          if (distVal <= q && (dist[vid2] == 0 || dist[vid2] > distVal)) {
            ver2.push_back(vid2);
            if (a[vid2]) {
              ds2.push_back(1);
              dist[vid2] = 1;
            } else {
              ds2.push_back(distVal + 1);
              dist[vid2] = distVal;
            }
            if (vid2 == t) {
              bDone = true;
              break;
            }
          }
        }
        if (bDone) break;
      }
      if (bDone) break;
      ver.swap(ver2);
      ver2.clear();
      ds.swap(ds2);
      ds2.clear();
      ++dsVal;
    }
    if (dist[t] == 0) {
      if (li == idx)
        ++li;
      else
        li = idx;
    } else {
      if (ri == idx)
        --ri;
      else
        ri = idx;
    }
  }
  cout << li;
  return 0;
}
