#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 101000;
int vol[MAXN], vis[MAXN], start, ending;
int dis[MAXN], disans[MAXN];
vector<int> g[MAXN];
struct NODE {
  int id, stepans, step;
  NODE(int i = 0, int sa = 0, int st = 0) : id(i), stepans(sa), step(st) {}
  bool operator<(const NODE &A) const {
    if (stepans == A.stepans) return step > A.step;
    return stepans > A.stepans;
  }
};
void init() {
  memset(vol, 0, sizeof(vol));
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < MAXN; i++) {
    dis[i] = disans[i] = INF;
    g[i].clear();
  }
}
void bfs() {
  dis[start] = disans[start] = 0;
  priority_queue<NODE> q;
  q.push(NODE(start, 1, 0));
  while (!q.empty()) {
    NODE u = q.top();
    q.pop();
    int uid = u.id;
    if (vis[uid]) continue;
    vis[uid] = 1;
    if (uid == ending) {
      printf("%d\n", u.stepans);
      return;
    }
    int vstepans = u.stepans, vstep = u.step + 1;
    if (vol[uid] == 1)
      vstep = 1;
    else if (u.stepans == u.step)
      vstepans++;
    for (unsigned int i = 0; i < g[uid].size(); i++) {
      int vid = g[uid][i];
      if (dis[vid] > vstep || disans[vid] > vstepans) {
        vis[vid] = 0;
        dis[vid] = vstep;
        disans[vid] = vstepans;
        q.push(NODE(vid, vstepans, vstep));
      }
    }
  }
  printf("-1\n");
  return;
}
int main() {
  int n, m, k, volunteer;
  while (~scanf("%d%d%d", &n, &m, &k)) {
    init();
    for (int i = 0; i < k; i++) {
      scanf("%d", &volunteer);
      vol[volunteer] = 1;
    }
    for (int i = 0; i < m; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      g[u].push_back(v);
      g[v].push_back(u);
    }
    scanf("%d%d", &start, &ending);
    bfs();
  }
  return 0;
}
