#include <bits/stdc++.h>
using namespace std;
const int MaxN = 100005, MaxC = 0x3F3F3F3F, NA = -1;
vector<int> adj[MaxN];
bool c[MaxN];
int d[MaxN];
int m, n, res, s, t;
int main(void) {
  int cur, i, j, k;
  while (scanf(" %d %d %d", &n, &m, &k) != EOF) {
    for (i = 0; i < n; i++) {
      adj[i].clear();
      c[i] = false;
      d[i] = MaxC;
    }
    for (i = 0; i < k; i++) {
      scanf(" %d", &j);
      j--;
      assert(!c[j]);
      c[j] = true;
    }
    for (i = 0; i < m; i++) {
      scanf(" %d %d", &j, &k);
      j--;
      k--;
      adj[j].push_back(k);
      adj[k].push_back(j);
    }
    scanf(" %d %d", &s, &t);
    s--;
    t--;
    assert(c[s]);
    set<pair<int, int> > q;
    d[s] = 0;
    q.insert(make_pair(d[s], s));
    res = 0;
    while (!q.empty()) {
      pair<int, int> p = *q.begin();
      cur = p.first;
      k = p.second;
      assert(true);
      res = max(res, cur);
      if (k == t) break;
      q.erase(p);
      if (c[k]) cur = 0;
      cur++;
      for (i = 0; i < (int)adj[k].size(); i++) {
        j = adj[k][i];
        assert(true);
        if (d[j] > cur) {
          q.erase(make_pair(d[j], j));
          d[j] = cur;
          q.insert(make_pair(d[j], j));
        }
      }
    }
    if (q.empty())
      printf("-1\n");
    else
      printf("%d\n", res);
  }
  return 0;
}
