#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 100, MAXM = 400000 + 100, INF = ~0U >> 4;
bool v[MAXN], vis[MAXN];
int g[MAXM], lis[MAXN], nex[MAXM], cnt = 0;
int dis[MAXN];
inline void add(int x, int y) {
  g[++cnt] = y;
  nex[cnt] = lis[x];
  lis[x] = cnt;
}
int n, m, k, S, T;
void init() {
  cin >> n >> m >> k;
  int x, y;
  memset(v, 0, sizeof v);
  ;
  memset(g, 0, sizeof g);
  ;
  memset(lis, 0, sizeof lis);
  ;
  memset(nex, 0, sizeof nex);
  ;
  for (int i = 0; i < k; i++) cin >> x, v[x] = 1;
  for (int i = 0; i < m; i++) cin >> x >> y, add(x, y), add(y, x);
  cin >> S >> T;
}
bool Reach(int s, int t) {
  queue<int> q;
  int now;
  memset(vis, 0, sizeof vis);
  ;
  vis[s] = true;
  for (q.push(s); !q.empty();) {
    now = q.front();
    q.pop();
    for (int i = lis[now]; i; i = nex[i])
      if (!vis[g[i]]) {
        if (g[i] == t) return true;
        vis[g[i]] = true;
        q.push(g[i]);
      }
  }
  return false;
}
struct node {
  int v, c;
  node(int _v, int _c) : v(_v), c(_c) {}
  friend bool operator<(node a, node b) { return a.c > b.c; }
};
bool dijkstra(int s, int t, int val) {
  for (int i = 1; i <= n; i++) dis[i] = INF;
  dis[s] = 0;
  memset(vis, 0, sizeof vis);
  ;
  vis[s] = true;
  priority_queue<node> q;
  node now(s, 0);
  for (q.push(now); q.size();) {
    now = q.top();
    q.pop();
    if (now.v == t) return true;
    if (dis[now.v] >= val) continue;
    for (int i = lis[now.v]; i; i = nex[i])
      if (!vis[g[i]] && v[g[i]]) {
        vis[g[i]] = true;
        q.push(node(g[i], dis[g[i]] = 0));
      } else if (dis[g[i]] > dis[now.v] + 1)
        q.push(node(g[i], dis[g[i]] = dis[now.v] + 1));
  }
  return false;
}
void solve() {
  if (Reach(S, T)) {
    int l = 1, r = n;
    while (l < r) {
      int mid = (l + r) >> 1;
      if (dijkstra(S, T, mid))
        r = mid;
      else
        l = mid + 1;
    }
    cout << l << endl;
  } else
    cout << "-1" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  init();
  solve();
  return 0;
}
