#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:200000000")
const double EPS = 1E-9;
const int INF = 1000000000;
const long long INF64 = (long long)1E18;
const double PI = 3.1415926535897932384626433832795;
int u[110000], us, s, t, d[110000], e[110000], q[110000];
vector<int> g[110000];
void dfs(int v, int x) {
  u[v] = us;
  for (int i = 0; i < (int)(g[v].size()); i++) {
    int to = g[v][i];
    if (u[to] == us || d[to] > INF / 2) continue;
    if (d[to] > x / 2) continue;
    if (x % 2 == 0 && d[v] == x / 2 && d[to] == x / 2) continue;
    dfs(to, x);
  }
}
bool can(int x) {
  us++;
  dfs(s, x);
  return u[t] == us;
}
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < (int)(k); i++) {
    scanf("%d", &e[i]);
    e[i]--;
  }
  for (int i = 0; i < (int)(m); i++) {
    int v1, v2;
    scanf("%d%d", &v1, &v2);
    v1--;
    v2--;
    g[v1].push_back(v2);
    g[v2].push_back(v1);
  }
  cin >> s >> t;
  s--;
  t--;
  for (int i = 0; i < (int)(n); i++) d[i] = INF;
  for (int i = 0; i < (int)(k); i++) d[e[i]] = 0;
  if (d[t] == INF) d[t] = 0;
  int qh = 0, qt = 0;
  for (int i = 0; i < (int)(n); i++)
    if (d[i] == 0) q[qt++] = i;
  while (qh < qt) {
    int v = q[qh++];
    for (int i = 0; i < (int)(g[v].size()); i++) {
      int to = g[v][i];
      if (d[to] > INF / 2) {
        d[to] = d[v] + 1;
        q[qt++] = to;
      }
    }
  }
  int l = 1;
  int r = n - 1;
  while (r - l > 1) {
    int mid = (r + l) / 2;
    if (can(mid))
      r = mid;
    else
      l = mid;
  }
  int ans = -1;
  for (int i = l; i <= r; i++)
    if (can(i)) {
      ans = i;
      break;
    }
  cout << ans << endl;
  return 0;
}
