#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > G;
vector<bool> V;
vector<int> T;
int main() {
  int n, m, k1;
  scanf("%d %d %d ", &n, &m, &k1);
  G.resize(n);
  V.resize(n, false);
  for (int i = 0; i < k1; i++) {
    int x;
    scanf("%d ", &x);
    V[x - 1] = true;
  }
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d %d ", &x, &y);
    x--;
    y--;
    G[x].push_back(y);
    G[y].push_back(x);
  }
  int z, k;
  scanf("%d %d ", &z, &k);
  z--;
  k--;
  int zac = 0, kon = n + 47;
  while (kon - zac > 1) {
    int stred = (kon + zac) / 2;
    T.clear();
    T.resize(n, -1);
    queue<int> Q;
    Q.push(z);
    Q.push(stred);
    T[z] = stred;
    bool t = false;
    while (!Q.empty()) {
      if (t) break;
      int v = Q.front();
      Q.pop();
      int krok = Q.front();
      Q.pop();
      if (krok != 0) {
        for (int i = 0; i < G[v].size(); i++) {
          int w = G[v][i];
          if (w == k) t = true;
          if (T[w] < krok - 1) {
            Q.push(w);
            if (!V[w]) {
              Q.push(krok - 1);
              T[w] = krok - 1;
            } else {
              Q.push(stred);
              T[w] = stred;
            }
          }
        }
      }
    }
    if (t)
      kon = stred;
    else
      zac = stred;
  }
  if (kon == n + 47)
    printf("-1\n");
  else
    printf("%d\n", kon);
  return 0;
}
