#include <bits/stdc++.h>
using namespace std;
void Read(int &x) {
  char c;
  bool flag = 0;
  while (c = getchar(), c != EOF && (c < '0' || c > '9') && c != '-')
    ;
  if (c == '-') {
    c = getchar();
    flag = 1;
  }
  x = c - '0';
  while (c = getchar(), c != EOF && c >= '0' && c <= '9') x = x * 10 + c - '0';
}
queue<int> q;
vector<int> a[100010];
int n, m, k, vis[100010], st, ed;
bool va[100010], inq[100010];
bool check(int s) {
  memset(vis, -1, sizeof vis);
  vis[st] = 0;
  q.push(st);
  while (!q.empty()) {
    int x = q.front();
    inq[x] = 0;
    q.pop();
    if (vis[x] + 1 > s) continue;
    for (int i = 0; i < a[x].size(); i++)
      if (vis[a[x][i]] == -1 || vis[a[x][i]] > vis[x] + 1) {
        vis[a[x][i]] = vis[x] + 1;
        if (va[a[x][i]] == 1) vis[a[x][i]] = 0;
        if (inq[a[x][i]] == 0) {
          inq[a[x][i]] = 1;
          q.push(a[x][i]);
        }
      }
  }
  if (vis[ed] != -1) return 1;
  return 0;
}
int main() {
  Read(n), Read(m), Read(k);
  int x, y;
  for (int i = 1; i <= k; i++) {
    Read(x);
    va[x] = 1;
  }
  for (int i = 1; i <= m; i++) {
    Read(x), Read(y);
    a[x].push_back(y);
    a[y].push_back(x);
  }
  Read(st), Read(ed);
  int l = 0, r = n;
  int ans = -1;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  printf("%d", ans);
}
