#include <bits/stdc++.h>
struct Edge;
struct Vertex {
  int dist;
  bool IsHelp;
  struct Edge *first;
};
struct Edge {
  struct Vertex *u;
  struct Vertex *v;
  struct Edge *next;
};
struct Vertex V[200000 + 1];
bool flag[200000 + 1];
int vn, en, k;
int s, t;
typedef struct Vertex *DataType;
struct QueueNode {
  DataType data;
  struct QueueNode *next;
};
typedef struct QueueNode *Qnptr;
struct QueueType {
  Qnptr head;
  Qnptr tail;
};
typedef struct QueueType *Qptr;
bool Empty_Queue(Qptr Q) {
  if (Q->head == NULL) return true;
  return false;
}
void EnQueue(Qptr Q, DataType data) {
  Qnptr p = (Qnptr)malloc(sizeof(struct QueueNode));
  p->next = NULL;
  p->data = data;
  if (Empty_Queue(Q)) {
    Q->head = Q->tail = p;
    return;
  }
  Q->tail->next = p;
  Q->tail = p;
}
void DeQueue(Qptr Q, DataType *data) {
  Qnptr p = NULL;
  if (Empty_Queue(Q)) {
    printf("Empty Queue!\n");
    return;
  }
  *data = Q->head->data;
  p = Q->head;
  Q->head = Q->head->next;
  if (Q->head == NULL) Q->tail = NULL;
  free(p);
}
void Queue_Init(Qptr Q) { Q->head = Q->tail = NULL; }
void Build_Graph() {
  int i;
  int ui, vi;
  struct Vertex *u, *v;
  struct Edge *e;
  scanf("%d%d%d", &vn, &en, &k);
  for (i = 1; i <= vn; i++) {
    V[i].dist = INT_MAX;
    V[i].IsHelp = false;
    V[i].first = NULL;
  }
  for (i = 1; i <= k; i++) {
    scanf("%d", &ui);
    V[ui].IsHelp = true;
  }
  for (i = 1; i <= en; i++) {
    scanf("%d%d", &ui, &vi);
    e = (struct Edge *)malloc(sizeof(struct Edge));
    e->u = V + ui;
    e->v = V + vi;
    e->next = e->u->first;
    e->u->first = e;
    e = (struct Edge *)malloc(sizeof(struct Edge));
    e->u = V + vi;
    e->v = V + ui;
    e->next = e->u->first;
    e->u->first = e;
  }
  scanf("%d%d", &s, &t);
}
void spfa_init() {
  int i;
  for (i = 1; i <= vn; i++) V[i].dist = INT_MAX;
  V[s].dist = 0;
  for (i = 1; i <= vn; i++) flag[i] = false;
}
bool spfa(int lim) {
  struct Vertex *u;
  struct Edge *e;
  int dist;
  spfa_init();
  QueueType Q;
  Queue_Init(&Q);
  EnQueue(&Q, V + s);
  flag[s] = true;
  while (!Empty_Queue(&Q)) {
    DeQueue(&Q, &u);
    flag[u - V] = false;
    if (u->dist >= lim) continue;
    for (e = u->first; e; e = e->next) {
      if (e->v - V == t) return true;
      dist = (e->v->IsHelp) ? 0 : u->dist + 1;
      if (dist < e->v->dist) {
        e->v->dist = dist;
        if (!flag[e->v - V]) {
          EnQueue(&Q, e->v);
          flag[e->v - V] = true;
        }
      }
    }
  }
  return false;
}
void Weak_Memory() {
  int l = 0, r = vn - 1;
  int mid;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (spfa(mid))
      r = mid - 1;
    else
      l = mid + 1;
  }
  printf("%d\n", (r + 1 == vn) ? -1 : r + 1);
}
int main() {
  Build_Graph();
  Weak_Memory();
  return 0;
}
