#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T mod_v(T num) {
  if (num >= 0)
    return num % 1000000007;
  else
    return (num % 1000000007 + 1000000007) % 1000000007;
}
template <class T>
inline T gcd(T a, T b) {
  a = abs(a);
  b = abs(b);
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
template <class T>
T fast_pow(T n, T p) {
  if (p == 0) return 1;
  if (p % 2) {
    T g = mod_v(mod_v(n) * mod_v(fast_pow(n, p - 1)));
    return g;
  } else {
    T g = fast_pow(n, p / 2);
    g = mod_v(mod_v(g) * mod_v(g));
    return g;
  }
}
template <class T>
inline T modInverse(T n) {
  return fast_pow(n, 1000000007 - 2);
}
template <class T>
inline void debug(string S1, T S2, string S3) {
  cout << S1 << S2 << S3;
}
bool equalTo(double a, double b) {
  if (fabs(a - b) <= 1e-9)
    return true;
  else
    return false;
}
bool notEqual(double a, double b) {
  if (fabs(a - b) > 1e-9)
    return true;
  else
    return false;
}
bool lessThan(double a, double b) {
  if (a + 1e-9 < b)
    return true;
  else
    return false;
}
bool lessThanEqual(double a, double b) {
  if (a < b + 1e-9)
    return true;
  else
    return false;
}
bool greaterThan(double a, double b) {
  if (a > b + 1e-9)
    return true;
  else
    return false;
}
bool greaterThanEqual(double a, double b) {
  if (a + 1e-9 > b)
    return true;
  else
    return false;
}
template <class T>
inline int in(register T& num) {
  register char c = 0;
  num = 0;
  bool n = false;
  while (c < 33) c = getchar();
  while (c > 33) {
    if (c == '-')
      n = true;
    else
      num = num * 10 + c - '0';
    c = getchar();
  }
  num = n ? -num : num;
  return 1;
}
vector<int> lst[100005];
int n, m, k;
int mark[100005];
int s, t;
class nod {
 public:
  int v, q;
  nod(int v, int q) {
    this->v = v;
    this->q = q;
  }
  bool operator<(const nod& a) const { return (q > a.q); }
};
int vis[100005];
bool ok(int q) {
  for (int i = 0; i <= n; i++) vis[i] = 1 << 30;
  vis[s] = 0;
  priority_queue<nod> qu;
  qu.push(nod(s, 0));
  bool ok = false;
  while (!qu.empty()) {
    nod nw = qu.top();
    qu.pop();
    if (nw.v == t) {
      ok = true;
      break;
    }
    for (int i = 0; i < ((int)lst[nw.v].size()); i++) {
      int k = lst[nw.v][i];
      if (nw.q + 1 < vis[k] && nw.q + 1 <= q) {
        vis[k] = nw.q + 1;
        qu.push(nod(k, (mark[k] == 1 ? 0 : vis[k])));
      }
    }
  }
  return ok;
}
int main() {
  in(n), in(m), in(k);
  int val;
  memset(mark, 0, sizeof(mark));
  ;
  for (int i = 0; i < k; i++) {
    in(val);
    mark[val] = 1;
  }
  int a, b;
  for (int i = 0; i < m; i++) {
    in(a), in(b);
    lst[a].push_back(b);
    lst[b].push_back(a);
  }
  in(s), in(t);
  int l = 1, r = 200005;
  int q = 1 << 30;
  while (l <= r) {
    int mid = (l + r) >> 1;
    bool g = ok(mid);
    if (g) {
      q = min(q, mid);
    }
    if (l == mid) {
      mid = r;
      g = ok(mid);
      if (g) {
        q = min(q, mid);
      }
      break;
    }
    if (g)
      r = mid;
    else
      l = mid;
  }
  if (q == 1 << 30)
    cout << -1;
  else
    cout << q;
  return 0;
}
