#include <bits/stdc++.h>
using namespace std;
const long d3 = 1000;
const long d4 = 10000;
const long d5 = 100000;
const long d6 = 1000000;
const long d7 = 10000000;
const long d8 = 100000000;
const long d9 = 1000000000;
vector<int> g[d5];
long n, m, k, s, t;
bool kk[d5] = {false}, used[d5];
inline bool check(long q) {
  int used[d5], tmp, cur, cnt, next;
  for (int i = 0; i < n; i++) {
    used[i] = q + 10;
  }
  queue<int> qu;
  used[s] = 0;
  qu.push(s);
  while (qu.size()) {
    cur = qu.front();
    qu.pop();
    if (cur == t) {
      return true;
    } else {
      if (kk[cur]) {
        used[cur] = 0;
      }
      tmp = used[cur] + 1;
      if (tmp <= q) {
        cnt = g[cur].size();
        for (int i = 0; i < cnt; i++) {
          next = g[cur][i];
          if (used[next] > tmp) {
            used[next] = tmp;
            qu.push(next);
          }
        }
      }
    }
  }
  return false;
}
void dfs(int v) {
  int tmp;
  for (int i = 0; i < g[v].size(); i++) {
    tmp = g[v][i];
    if (!used[tmp]) {
      used[tmp] = true;
      dfs(tmp);
    }
  }
}
bool isReal(long s, long f) {
  for (int i = 0; i < n; i++) {
    used[i] = false;
  }
  dfs(s);
  return used[f];
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    g[i].clear();
  }
  long u, v, tmp;
  for (int i = 0; i < k; i++) {
    cin >> tmp;
    tmp--;
    kk[tmp] = true;
  }
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    u--;
    v--;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  cin >> s >> t;
  s--;
  t--;
  if (isReal(s, t)) {
    long up = n, down = 0, tmp;
    while (up - down > 1) {
      tmp = (up + down) / 2;
      if (check(tmp)) {
        up = tmp;
      } else {
        down = tmp;
      }
    }
    while (!check(down)) {
      down++;
    }
    cout << down;
  } else
    cout << -1;
  return 0;
}
