#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int MaxQ = 10000000;
const int MaxN = 100005;
struct Edge {
  int cnt, nxt;
} edge[MaxN * 5];
int head[MaxN];
int Dis[MaxN];
int Flag[MaxN];
int Q[MaxQ];
int F[MaxN];
int et;
int S, T;
int spfa(int Max) {
  int ql = 0, qr = 0;
  memset(Dis, inf, sizeof(Dis));
  Dis[S] = 0;
  Flag[S] = 1;
  Q[qr++] = S;
  while (ql != qr) {
    int nx = Q[ql++];
    if (ql >= MaxQ) ql -= MaxQ;
    Flag[nx] = 0;
    for (int p = head[nx]; p != -1; p = edge[p].nxt) {
      int ny = edge[p].cnt;
      int temp = Dis[nx] + 1;
      if (temp <= Max) {
        if (F[ny]) temp = 0;
        if (temp < Dis[ny]) {
          Dis[ny] = temp;
          if (!Flag[ny]) {
            Flag[ny] = 1;
            Q[qr++] = ny;
            if (qr >= MaxQ) qr -= MaxQ;
          }
        }
      }
    }
  }
  if (Dis[T] != inf) return 1;
  return 0;
}
void addedge(int u, int v) {
  edge[et].cnt = v, edge[et].nxt = head[u], head[u] = et++;
}
int main() {
  int N, M, K;
  et = 0;
  memset(head, -1, sizeof(head));
  scanf("%d%d%d", &N, &M, &K);
  for (int i = 0; i < K; ++i) {
    int a;
    scanf("%d", &a);
    F[a] = 1;
  }
  for (int i = 0; i < M; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    addedge(u, v);
    addedge(v, u);
  }
  scanf("%d%d", &S, &T);
  int head = 1, tail = M, res = -1;
  while (head <= tail) {
    int mid = (head + tail) >> 1;
    if (spfa(mid)) {
      res = mid;
      tail = mid - 1;
    } else {
      head = mid + 1;
    }
  }
  printf("%d\n", res);
}
