#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    que;
const int maxn = 1e5 + 5;
const int maxm = 4e5 + 5;
const int inf = 0x7fffffff;
int n, m, k, s, e;
bool g[maxn];
int cap[maxn];
int first[maxn];
int nxt[maxm];
int to[maxm];
void add(int f, int t, int ind) {
  nxt[ind] = first[f];
  first[f] = ind;
  to[ind] = t;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  fill(cap, cap + n + 1, inf);
  memset(first, -1, sizeof(first));
  for (int i = 0; i < k; i++) {
    int guide;
    scanf("%d", &guide);
    g[guide] = true;
  }
  for (int i = 0; i < m; i++) {
    int f, t;
    scanf("%d%d", &f, &t);
    add(f, t, 2 * i);
    add(t, f, 2 * i + 1);
  }
  scanf("%d%d", &s, &e);
  int ans = 0;
  cap[s] = 0;
  que.push(pair<int, int>(0, s));
  while (!que.empty()) {
    int c = que.top().first, f = que.top().second;
    que.pop();
    if (c > cap[f]) continue;
    ans = max(ans, c);
    if (f == e) break;
    if (g[f]) c = 0;
    for (int p = first[f]; p != -1; p = nxt[p]) {
      if (cap[to[p]] > c + 1) {
        cap[to[p]] = c + 1;
        que.push(pair<int, int>(c + 1, to[p]));
      }
    }
  }
  printf("%d", cap[e] == inf ? -1 : ans);
  return 0;
}
