#include <bits/stdc++.h>
using namespace std;
int n, m, k, s, dd;
const int INF = 1e9;
class point {
 public:
  int i, d;
  point(int _i, int _d) { i = _i, d = _d; }
  friend bool operator<(class point A, class point B) {
    if (A.d != B.d) return A.d > B.d;
    return A.i != dd;
  }
};
vector<int> G[100005];
priority_queue<class point> q;
bool blue[100005];
bool vis[100005];
int MIN[100005];
void scan() {
  int t;
  memset(blue, 0, sizeof(blue));
  for (int i = 0; i < k; i++) {
    scanf("%d", &t);
    blue[t] = 1;
  }
  int x, y;
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  cin >> s >> dd;
}
int compute() {
  int ans = 0;
  while (!q.empty()) {
    struct point t = q.top();
    q.pop();
    if (t.i == dd) return ans;
    ans = max(ans, t.d);
    for (int i = 0; i < G[t.i].size(); i++) {
      int j = G[t.i][i];
      int temp = t.d + 1;
      if (blue[j]) temp = 1;
      if (MIN[j] > temp) {
        MIN[j] = temp;
        q.push(point(j, temp));
      }
    }
  }
  return -1;
}
int main() {
  cin >> n >> m >> k;
  scan();
  for (int i = 0; i <= n; i++) MIN[i] = INF;
  q.push(point(s, 1));
  memset(vis, 0, sizeof(vis));
  cout << compute() << endl;
  return 0;
}
