#include <bits/stdc++.h>
using namespace std;
queue<pair<int, int> > q;
bool isHelper[100000];
vector<int> eList[100000];
int n, m, K, s, e;
int dist[100000];
bool isReachable(int Q);
int main(void) {
  scanf("%d %d %d", &n, &m, &K);
  for (int i = 0; i < K; i++) {
    int temp;
    scanf("%d", &temp);
    isHelper[temp - 1] = true;
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    eList[u - 1].push_back(v - 1);
    eList[v - 1].push_back(u - 1);
  }
  scanf("%d %d", &s, &e);
  s--, e--;
  int start = 1, end = n, mid, ans = -1;
  while (start < end) {
    mid = (start + end) / 2;
    if (isReachable(mid))
      ans = end = mid;
    else
      start = mid + 1;
  }
  printf("%d\n", ans);
  return 0;
}
bool isReachable(int Q) {
  while (!q.empty()) q.pop();
  memset(dist, -1, sizeof(dist));
  dist[s] = 0;
  q.push(make_pair(s, 0));
  while (!q.empty()) {
    int cur = q.front().first;
    int curDist = q.front().second;
    q.pop();
    if (curDist < Q) {
      for (int i = 0; i < eList[cur].size(); i++) {
        int next = eList[cur][i];
        if (next == e) return true;
        if (dist[next] != -1 && dist[next] < curDist + 1) continue;
        if (isHelper[next])
          dist[next] = 0;
        else
          dist[next] = curDist + 1;
        q.push(make_pair(next, dist[next]));
      }
    }
  }
  return false;
}
