#include <bits/stdc++.h>
using namespace std;
bool vol[100010], vis[100010];
int n, e, fst[100010], nxt[400010], v[400010];
int d[100010];
struct node {
  int pt, w;
  friend bool operator<(node a, node b) { return a.w > b.w; }
};
inline void AddEdge(int x, int y) {
  v[e] = y;
  nxt[e] = fst[x];
  fst[x] = e++;
}
bool Reach(int s, int t) {
  int i, head;
  queue<int> q;
  q.push(s);
  memset(vis, false, sizeof(vis));
  vis[s] = true;
  while (!q.empty()) {
    head = q.front();
    q.pop();
    for (i = fst[head]; i != -1; i = nxt[i]) {
      if (!vis[v[i]]) {
        if (v[i] == t) return true;
        vis[v[i]] = true;
        q.push(v[i]);
      }
    }
  }
  return false;
}
bool Dijkstra(int s, int t, int step) {
  int i;
  node head, temp;
  priority_queue<node> q;
  memset(vis, false, sizeof(vis));
  for (i = 1; i <= n; i++) d[i] = 123456789;
  d[s] = 0;
  head.pt = s;
  head.w = 0;
  q.push(head);
  while (!q.empty()) {
    head = q.top();
    q.pop();
    if (head.pt == t) return true;
    if (d[head.pt] >= step) continue;
    for (i = fst[head.pt]; i != -1; i = nxt[i]) {
      if (!vis[v[i]] && vol[v[i]]) {
        vis[v[i]] = true;
        temp.w = d[v[i]] = 0;
        temp.pt = v[i];
        q.push(temp);
      } else if (d[v[i]] > d[head.pt] + 1) {
        temp.w = d[v[i]] = d[head.pt] + 1;
        temp.pt = v[i];
        q.push(temp);
      }
    }
  }
  return false;
}
int main() {
  int s, t, m, k, i, j, high, low, mid;
  while (~scanf("%d%d%d", &n, &m, &k)) {
    memset(fst, -1, sizeof(fst));
    memset(vol, false, sizeof(vol));
    for (e = 0; k--;) {
      scanf("%d", &i);
      vol[i] = true;
    }
    while (m--) {
      scanf("%d%d", &i, &j);
      AddEdge(i, j);
      AddEdge(j, i);
    }
    scanf("%d%d", &s, &t);
    if (Reach(s, t)) {
      low = 1;
      high = n;
      while (low < high) {
        mid = (low + high) >> 1;
        if (Dijkstra(s, t, mid))
          high = mid;
        else
          low = mid + 1;
      }
      printf("%d\n", low);
    } else
      puts("-1");
  }
  return 0;
}
