#include <bits/stdc++.h>
using namespace std;
int dist[200005];
vector<int> e[200005];
int n, m, k;
bool marked[200005];
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    q;
int ans;
int s, t;
int bfs() {
  for (int i = 1; i <= n; i++) dist[i] = 2000000000;
  dist[s] = 0;
  q.push(make_pair(0, s));
  while (!q.empty()) {
    pair<int, int> x = q.top();
    q.pop();
    int u = x.second;
    for (int i = 0; i < e[u].size(); i++) {
      int v = e[u][i];
      if (dist[u] + 1 < dist[v]) {
        ans = max(ans, dist[u] + 1);
        if (v == t) return ans;
        dist[v] = dist[u] + 1;
        if (marked[v]) dist[v] = 0;
        q.push(make_pair(dist[v], v));
      }
    }
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int u;
    cin >> u;
    marked[u] = 1;
  }
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  ans = 0;
  cin >> s >> t;
  cout << bfs() << endl;
}
