#include <bits/stdc++.h>
using namespace std;
struct dd {
  int to, next;
} a[500001];
int q, head[100001], dis[100001], start, over, n, m, sn, ans;
bool spe[100001];
void add(int xx, int yy) {
  a[++q].to = yy;
  a[q].next = head[xx];
  head[xx] = q;
}
struct ss {
  int dis;
  int pos;
  bool operator<(const ss &t) const { return t.dis < dis; }
} u, ert;
priority_queue<ss> que;
void bfs() {
  dis[start] = 0;
  u.dis = 0;
  u.pos = start;
  que.push(u);
  while (!que.empty()) {
    u = que.top();
    que.pop();
    if (u.dis > dis[u.pos]) continue;
    ans = max(ans, u.dis);
    if (u.pos == over) return;
    if (spe[u.pos]) dis[u.pos] = 0;
    for (int i = head[u.pos]; i; i = a[i].next)
      if (dis[a[i].to] > dis[u.pos] + 1) {
        dis[a[i].to] = dis[u.pos] + 1;
        ert.dis = dis[a[i].to];
        ert.pos = a[i].to;
        que.push(ert);
      }
  }
}
int main() {
  int x, y, z;
  for (int i = 1; i <= 100000; i++) dis[i] = 1073741824;
  cin >> n >> m >> sn;
  for (int i = 1; i <= sn; i++) {
    scanf("%d", &x);
    spe[x] = 1;
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  cin >> start >> over;
  bfs();
  if (dis[over] != 1073741824)
    cout << ans;
  else
    cout << -1;
}
