#include <bits/stdc++.h>
using namespace std;
vector<int> q[300100];
int spfa_q[300100];
int dis[300100];
int vol[300100];
bool flag_spfa_q[2000100];
bool flag[300100];
int n, m, k, s, t;
bool check(int x) {
  memset(flag_spfa_q, 0, sizeof(flag_spfa_q));
  memset(dis, -127, sizeof(dis));
  dis[s] = 0;
  spfa_q[1] = s;
  int spfa_q_tail = 1;
  int spfa_q_head = 0;
  int now;
  flag_spfa_q[s] = true;
  for (int i = 1; i <= k; i++) dis[vol[i]] = x;
  dis[t] = -200000000;
  while (spfa_q_tail != spfa_q_head) {
    spfa_q_head++;
    now = spfa_q[spfa_q_head];
    if (!flag[now]) flag_spfa_q[now] = false;
    if (now == t) return true;
    for (int i = 0; i < q[now].size(); i++) {
      if (flag[q[now][i]] == false)
        if ((dis[q[now][i]] < dis[now] - 1))
          if (dis[now] > 0) {
            dis[q[now][i]] = dis[now] - 1;
            if (flag_spfa_q[q[now][i]] == false) {
              flag_spfa_q[q[now][i]] = true;
              spfa_q_tail++;
              spfa_q[spfa_q_tail] = q[now][i];
            }
          }
      if (flag[q[now][i]] == true)
        if (flag_spfa_q[q[now][i]] == false)
          if (dis[now] > 0) {
            flag_spfa_q[q[now][i]] = true;
            spfa_q_tail++;
            spfa_q[spfa_q_tail] = q[now][i];
          }
    }
  }
  return false;
}
int main() {
  int x, y;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &vol[i]);
    flag[vol[i]] = true;
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    q[x].push_back(y);
    q[y].push_back(x);
  }
  scanf("%d%d", &s, &t);
  flag[t] = false;
  int l = 1, r = 200000, mid;
  while (l != r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (l == 200000)
    printf("-1");
  else
    printf("%d", l);
  return 0;
}
