#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 11;
const int inf = 0x3f3f3f3f;
struct node {
  int to, next;
} e[maxn * 2];
struct lu {
  int u;
  int cost;
  bool operator<(const lu &k) const { return k.cost < cost; }
} p, pp;
int head[maxn], dis[maxn];
int cnt, n, k, m, x, y, st, ed;
int a[maxn];
void add(int x, int y) {
  e[cnt].to = y;
  e[cnt].next = head[x];
  head[x] = cnt++;
}
priority_queue<lu> q;
int bfs() {
  int ans = 0;
  p.u = st;
  p.cost = 0;
  q.push(p);
  for (int i = 1; i <= n; i++) dis[i] = inf;
  dis[st] = 0;
  while (!q.empty()) {
    p = q.top();
    q.pop();
    int u = p.u;
    if (p.cost > dis[u]) continue;
    ans = max(ans, p.cost);
    if (u == ed) return ans;
    if (a[u]) dis[u] = 0;
    for (int i = head[u]; i != -1; i = e[i].next) {
      int v = e[i].to;
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        pp.u = v;
        pp.cost = dis[v];
        q.push(pp);
      }
    }
  }
  return dis[ed];
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= k; i++) {
    cin >> x;
    a[x] = 1;
  }
  memset(head, -1, sizeof(head));
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    add(x, y);
    add(y, x);
  }
  cin >> st >> ed;
  int ans = bfs();
  if (ans == inf)
    puts("-1");
  else
    cout << ans << endl;
  return 0;
}
