#include <bits/stdc++.h>
using namespace std;
int visited[100010], dist[100010], mk[100010], sz[100010], par[100010],
    hom[100010];
vector<int> graph[100010];
int root(int a) {
  while (par[a] != a) a = par[a];
  return a;
}
int unionit(int a, int b) {
  int x = root(a);
  int y = root(b);
  if (sz[x] < sz[y]) {
    par[x] = y;
    sz[y] += sz[x];
  } else {
    par[y] = x;
    sz[x] += sz[y];
  }
}
bool findunion(int a, int b) { return root(a) == root(b); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int a;
    cin >> a;
    mk[a - 1] = 1;
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    graph[a - 1].push_back(b - 1);
    graph[b - 1].push_back(a - 1);
  }
  int s, t;
  cin >> s >> t;
  s--;
  t--;
  int low = 1, high = 1e9 + 1;
  while (low < high) {
    int mid = (low + high) / 2;
    memset(visited, 0, sizeof(visited));
    for (int i = 0; i < n; i++) {
      dist[i] = 0;
      sz[i] = 1;
      par[i] = i;
      hom[i] = i;
    }
    queue<int> df;
    for (int i = 0; i < n; i++) {
      if (mk[i] || i == t) df.push(i), visited[i] = 1;
    }
    while (df.size()) {
      int x = df.front();
      df.pop();
      for (int i = 0; i < graph[x].size(); i++) {
        if (!visited[graph[x][i]]) {
          dist[graph[x][i]] = dist[x] + 1;
          visited[graph[x][i]] = 1;
          hom[graph[x][i]] = hom[x];
          df.push(graph[x][i]);
        } else {
          if (dist[x] + dist[graph[x][i]] + 1 <= mid &&
              hom[x] != hom[graph[x][i]] &&
              !findunion(hom[x], hom[graph[x][i]])) {
            unionit(hom[x], hom[graph[x][i]]);
          }
        }
      }
    }
    if (root(s) == root(t))
      high = mid;
    else
      low = mid + 1;
  }
  if (low == 1e9 + 1)
    cout << -1 << '\n';
  else
    cout << low << '\n';
}
