#include <bits/stdc++.h>
using namespace std;
int hv[101000];
vector<int> g[101000];
int d[101000];
int ss, tt;
bool inq[101000];
int n;
const int INF = 1000000000;
inline int f(int dd) {
  queue<int> q;
  int i;
  for (i = 1; i <= n; i++) d[i] = INF;
  d[ss] = 0;
  memset(inq, 0, sizeof(inq));
  q.push(ss);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    inq[x] = false;
    if (d[x] == dd) continue;
    for (i = 0; i < g[x].size(); i++) {
      int y = g[x][i];
      if (d[y] > d[x] + 1) {
        d[y] = d[x] + 1;
        if (hv[y]) d[y] = 0;
        if (!inq[y]) {
          inq[y] = true;
          q.push(y);
        }
      }
    }
  }
  if (d[tt] != INF) return 1;
  return 0;
}
int main() {
  int m, k, i, j;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 0; i < k; i++) {
    int x;
    scanf("%d", &x);
    hv[x] = 1;
  }
  while (m--) {
    int a, b;
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  scanf("%d%d", &ss, &tt);
  int l = 1, r = n;
  while (l < r) {
    int m = (l + r) / 2;
    if (f(m))
      r = m;
    else
      l = m + 1;
  }
  if (f(l))
    printf("%d\n", l);
  else
    puts("-1");
}
