#include <bits/stdc++.h>
using namespace std;
int d[100005], n, m, k;
int mark[100005], in_que[100005], x, y, cnt;
struct Edge {
  int to;
  Edge *next;
} * mat[100005], edges[100005 * 4];
void link(int x, int to) {
  edges[cnt].to = to;
  edges[cnt].next = mat[x];
  mat[x] = &edges[cnt++];
}
bool check(int &x, int y) {
  if (x == -1 || x > y) {
    x = y;
    return true;
  }
  return false;
}
bool solve(int mid) {
  queue<int> que;
  while (!que.empty()) que.pop();
  memset(mark, false, sizeof(mark));
  memset(in_que, false, sizeof(in_que));
  for (int i = 0; i < n; i++)
    if (d[i] != 0) d[i] = -1;
  mark[x] = true;
  que.push(x);
  while (!que.empty()) {
    int i = que.front();
    in_que[i] = false;
    que.pop();
    for (Edge *p = mat[i]; p; p = p->next) {
      int to = p->to;
      if (to == y) return true;
      if (d[to] == 0 && !mark[to]) {
        que.push(to);
        mark[to] = true;
      }
      if (d[i] != mid - 1 && check(d[to], d[i] + 1)) {
        if (!in_que[to]) {
          in_que[to] = true;
          que.push(to);
        }
      }
    }
  }
  return false;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  memset(d, -1, sizeof(d));
  while (k--) {
    scanf("%d", &x);
    d[x] = 0;
  }
  while (m--) {
    scanf("%d%d", &x, &y);
    link(x, y);
    link(y, x);
  }
  scanf("%d%d", &x, &y);
  int ans = -1, l = 1, r = n - 1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (solve(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  printf("%d\n", ans);
}
