#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 4;
const int K = 60;
const int M = 505;
const int inf = (int)1e9 + 7;
vector<int> g[N];
int d[N];
bool u[N];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; ++i) {
    int p;
    scanf("%d", &p);
    --p;
    u[p] = 1;
  }
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  int s, t;
  scanf("%d%d", &s, &t);
  --s;
  --t;
  int l = 0, r = n;
  for (; r > l;) {
    int md = (l + r) / 2;
    for (int i = 0; i < n; ++i) {
      d[i] = inf;
    }
    d[t] = 0;
    queue<int> q;
    q.push(t);
    for (; !q.empty(); q.pop()) {
      int v = q.front();
      for (int i = 0; i < (int)g[v].size(); ++i) {
        if (d[g[v][i]] > d[v] + 1 && d[v] + 1 <= md) {
          if (u[g[v][i]]) {
            d[g[v][i]] = 0;
          } else {
            d[g[v][i]] = d[v] + 1;
          }
          q.push(g[v][i]);
        }
      }
    }
    if (d[s] != inf) {
      r = md;
    } else {
      l = md + 1;
    }
  }
  if (l == n) {
    printf("-1");
  } else {
    printf("%d", l);
  }
  return 0;
}
