#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
vector<int> a[N];
priority_queue<pair<int, int> > Q;
int d[N], vis[N], cc[N];
int good[N], from[N], res[N];
int main(void) {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    int x;
    scanf("%d", &x);
    good[x] = 1;
  }
  while (m--) {
    int u, v;
    scanf("%d%d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  int st, ed;
  scanf("%d%d", &st, &ed);
  Q.push(make_pair(0, st));
  int best = 0, INF = 1e9;
  for (int i = 1; i <= n; i++) d[i] = INF, res[i] = INF;
  d[st] = 0;
  cc[st] = 0;
  from[st] = -1;
  res[st] = 0;
  if (st == ed) {
    puts("0");
    return 0;
  }
  while (!Q.empty() && !vis[ed]) {
    pair<int, int> tmp = Q.top();
    Q.pop();
    int x = tmp.second;
    best = max(best, -tmp.first);
    if (-tmp.first > d[x]) continue;
    vis[x] = 1;
    if (good[x]) d[x] = 0;
    for (int i = 0; i < (int)a[x].size(); i++) {
      int y = a[x][i];
      if (d[y] > d[x] + 1) {
        d[y] = good[y] && d[x] + 1 <= best ? 0 : d[x] + 1;
        Q.push(make_pair(-d[y], y));
      }
    }
  }
  if (vis[ed] == 0) {
    puts("-1");
    return 0;
  }
  printf("%d\n", best);
  return 0;
}
