#include <bits/stdc++.h>
using namespace std;
struct node {
  int v, next;
} ed[100005 * 4];
int head[100005], step[100005], flag[100005], que[100005], use[100005];
int n, m, k, s, t, q, f1, r1, num;
void addedge(int u, int v) {
  ed[num].v = v;
  ed[num].next = head[u];
  head[u] = num++;
}
void init() {
  int i, j;
  memset(flag, 0, sizeof(flag));
  memset(use, 0, sizeof(use));
  memset(step, -1, sizeof(step));
  memset(head, -1, sizeof(head));
  num = 0;
  for (i = 0; i < k; i++) {
    scanf("%d", &j);
    flag[j] = 1;
  }
  while (m--) {
    scanf("%d%d", &i, &j);
    addedge(i, j);
    addedge(j, i);
  }
  scanf("%d%d", &s, &t);
}
void dfs(int x, int cnt) {
  if (cnt < step[x]) return;
  if (flag[x]) cnt = q;
  step[x] = cnt;
  if (x == t || cnt == 0) {
    if (!use[x]) que[r1++] = x;
    use[x] = 1;
    return;
  }
  for (int i = head[x]; i != -1; i = ed[i].next) dfs(ed[i].v, cnt - 1);
}
void solve() {
  int i, j, r2, f;
  q = f1 = r1 = r2 = 0;
  que[r1++] = s;
  use[s] = 1;
  step[s] = 1;
  f = 1;
  while (f1 < r1 && f) {
    f1 = r2;
    r2 = r1;
    q++;
    while (f1 < r2 && f) {
      i = que[f1++];
      for (j = head[i]; j != -1; j = ed[j].next) {
        if (ed[j].v == t) {
          step[t] = q;
          f = 0;
          break;
        } else {
          if (flag[ed[j].v]) dfs(ed[j].v, q);
          if (step[t] != -1) {
            step[t] = q;
            f = 0;
            break;
          }
          if (!use[ed[j].v]) {
            que[r1++] = ed[j].v;
            use[ed[j].v] = 1;
          }
        }
      }
    }
  }
  printf("%d\n", step[t]);
}
int main() {
  while (~scanf("%d%d%d", &n, &m, &k)) {
    init();
    solve();
  }
  return 0;
}
