#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
#pragma hdrstop
using namespace std;
inline void sIO() {}
inline void iIO() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
inline void fIO(string fn) {
  freopen((fn + ".in").c_str(), "r", stdin);
  freopen((fn + ".out").c_str(), "w", stdout);
}
inline void TM() {}
template <class T>
inline T abs(T x) {
  return x < 0 ? -x : x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T gcd(T a, T b) {
  if (a < b) swap(a, b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class T>
inline T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
template <class T>
inline bool isPrime(T n) {
  if (n < 2) return false;
  T kk = (T)sqrt(n + 0.);
  for (T i = 2; i <= kk; ++i)
    if (!(n % i)) return false;
  return true;
}
template <class T>
inline string toa(T x) {
  stringstream ss;
  ss << x;
  string ret;
  ss >> ret;
  return ret;
}
inline int toi(string s) {
  stringstream ss;
  ss << s;
  int ret;
  ss >> ret;
  return ret;
}
inline long long tol(string s) {
  stringstream ss;
  ss << s;
  long long ret;
  ss >> ret;
  return ret;
}
inline void swap(short& a, short& b) { b ^= a ^= b ^= a; }
inline void swap(int& a, int& b) { b ^= a ^= b ^= a; }
inline void swap(char& a, char& b) { b ^= a ^= b ^= a; }
inline void swap(long long& a, long long& b) { b ^= a ^= b ^= a; }
inline char upperCase(char ch) {
  return (ch >= 'a' && ch <= 'z') ? ch ^ 32 : ch;
}
inline char lowerCase(char ch) {
  return (ch >= 'A' && ch <= 'Z') ? ch ^ 32 : ch;
}
inline string upperCase(string s) {
  int ls = s.length();
  for (int i = 0; i < ls; ++i)
    if (s[i] >= 'a' && s[i] <= 'z') s[i] ^= 32;
  return s;
}
inline string lowerCase(string s) {
  int ls = s.length();
  for (int i = 0; i < ls; ++i)
    if (s[i] >= 'A' && s[i] <= 'Z') s[i] ^= 32;
  return s;
}
inline int dig(char ch) { return ch - 48; }
inline bool isAlpha(char ch) {
  return (ch >= 'A' && ch <= 'Z' || ch >= 'a' && ch <= 'z');
}
inline bool isDigit(char ch) { return (ch >= '0' && ch <= '9'); }
inline bool isLowerCase(char ch) { return (ch >= 'a' && ch <= 'z'); }
inline bool isUpperCase(char ch) { return (ch >= 'A' && ch <= 'Z'); }
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-9;
const int MD = 1000000007;
int n, m, k, p[333333], vs, vt, d[333333], x, y, q[333333], h, t, nn, tt, tto;
vector<vector<int> > g;
int findSet(int v) {
  if (p[v] != v) p[v] = findSet(p[v]);
  return p[v];
}
void unite(int a, int b) {
  a = findSet(a);
  b = findSet(b);
  if (a != b) {
    if (rand() & 1) swap(a, b);
    p[a] = b;
  }
}
int main() {
  sIO();
  scanf("%d %d %d", &n, &m, &k);
  memset(d, -1, sizeof(d));
  nn = n + m;
  for (int i = 1; i <= nn; ++i) p[i] = i;
  g.resize(n + m + 5);
  for (int i = 0; i < k; ++i) {
    scanf("%d", q + i);
    d[q[i]] = 0;
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%d %d", &x, &y);
    g[x].push_back(i + n);
    g[i + n].push_back(x);
    g[y].push_back(i + n);
    g[i + n].push_back(y);
  }
  scanf("%d %d", &vs, &vt);
  h = 0;
  t = k - 1;
  if (d[vt] == -1) {
    d[vt] = 0;
    q[++t] = vt;
  }
  if (vs == vt) {
    printf("0");
    return 0;
  }
  while (h <= t) {
    x = q[h++];
    tt = (int)g[x].size();
    for (int i = 0; i < tt; ++i) {
      tto = g[x][i];
      if (d[tto] == -1) {
        d[tto] = d[x] + 1;
        q[++t] = tto;
      }
      unite(x, tto);
    }
    if (findSet(vs) == findSet(vt)) {
      printf("%d", d[x] + 1);
      return 0;
    }
  }
  printf("-1");
  return 0;
}
