#include <bits/stdc++.h>
using namespace std;
const int BufferSize = 300000;
const int MaxNum = 1000000000;
vector<int> edges[BufferSize];
int is_volunteer[BufferSize] = {0};
int flags[BufferSize] = {0};
int d[BufferSize];
int n, m, k;
int s, t;
bool FindPath(int q) {
  deque<int> qu;
  fill_n(d, n, MaxNum);
  for (int i = 0; i < n; ++i) {
    if (flags[i] && is_volunteer[i]) {
      qu.push_back(i);
      d[i] = 0;
    }
  }
  while (!qu.empty()) {
    int x = qu.front();
    qu.pop_front();
    for (unsigned i = 0; i < edges[x].size(); ++i) {
      int y = edges[x][i];
      if (d[x] + 1 < d[y]) {
        qu.push_back(y);
        d[y] = d[x] + 1;
        if (is_volunteer[y] && d[y] <= q) d[y] = 0;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    if (d[i] <= q)
      flags[i] = 1;
    else
      flags[i] = 0;
  }
  return flags[t];
}
int main(int argc, char *argv[]) {
  cin >> n >> m >> k;
  for (int i = 0; i < k; ++i) {
    int x;
    cin >> x;
    --x;
    is_volunteer[x] = true;
  }
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    edges[x].push_back(y);
    edges[y].push_back(x);
  }
  cin >> s >> t;
  --s;
  --t;
  flags[s] = true;
  int q = 1;
  while (true) {
    if (FindPath(q))
      break;
    else {
      if (d[t] == MaxNum) {
        q = -1;
        break;
      }
      int minimum = d[t];
      for (int i = 0; i < n; ++i) {
        if (!flags[i] && is_volunteer[i] && d[i] < minimum) minimum = d[i];
      }
      q = minimum;
    }
  }
  cout << q << endl;
  return 0;
}
