#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1e18 + 7;
const int N = 1e5 + 7;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
const double PI = acos(-1.0);
const double EPS = 1e-8;
int n, m, k, s, t, vol[N], dis[N], vis[N];
vector<int> e[N];
bool check(int q) {
  queue<int> que;
  for (int i = (1); i < (n + 1); ++i) dis[i] = INF, vis[i] = false;
  dis[s] = 0, vis[s] = true, que.push(s);
  while (!que.empty()) {
    int u = que.front();
    que.pop();
    if (dis[u] >= q) {
      vis[u] = false;
      continue;
    }
    for (int i = (0); i < (((int)(e[u]).size())); ++i) {
      int v = e[u][i];
      if (dis[v] > dis[u] + 1) {
        dis[v] = dis[u] + 1;
        if (vol[v]) dis[v] = 0;
        if (!vis[v]) vis[v] = true, que.push(v);
      }
    }
    vis[u] = false;
  }
  return dis[t] < INF;
}
int solve() {
  int l = 1, r = n;
  while (l + 1 < r) {
    int m = (l + r) >> 1;
    check(m) ? r = m : l = m;
  }
  if (check(l)) return l;
  if (check(r)) return r;
  return -1;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = (1); i < (n + 1); ++i) vol[i] = false;
  for (int i = (0); i < (k); ++i) {
    int x;
    scanf("%d", &x);
    vol[x] = true;
  }
  for (int i = (0); i < (m); ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v), e[v].push_back(u);
  }
  scanf("%d%d", &s, &t);
  int ans = solve();
  printf("%d", ans);
  return 0;
}
