#include <bits/stdc++.h>
using namespace std;
const int NN = 100 * 1000 + 100;
vector<int> G[NN];
bool vol[NN];
int d[NN];
int src, sink;
bool improve(int x, int y) { return y == -1 || y > x; }
bool can(int L) {
  queue<int> q;
  q.push(src);
  memset(d, -1, sizeof(d));
  d[src] = 0;
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    for (int i = 0; i < ((int)G[cur].size()); i++) {
      int adj = G[cur][i];
      if (vol[adj]) {
        if (d[cur] + 1 <= L && improve(0, d[adj])) {
          d[adj] = 0;
          q.push(adj);
        }
      } else {
        if (d[cur] + 1 <= L && improve(d[cur] + 1, d[adj])) {
          d[adj] = d[cur] + 1;
          q.push(adj);
        }
      }
    }
  }
  return d[sink] != -1;
}
int main() {
  ios::sync_with_stdio(false);
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int a, b;
  memset(vol, false, sizeof(vol));
  for (int i = 0; i < k; i++) {
    scanf("%d", &a);
    vol[a] = true;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  scanf("%d%d", &src, &sink);
  vol[sink] = true;
  int lo = 0, hi = 2 * 1e5 + 100;
  while (lo < hi) {
    int mid = (lo + hi) >> 1;
    bool res = can(mid);
    if (res)
      hi = mid;
    else
      lo = mid + 1;
  }
  if (can(lo))
    cout << lo << endl;
  else
    cout << -1 << endl;
}
