#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool upmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool upmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const long double eps = 1e-11;
const long double pi = acos(-1);
const int oo = 1 << 30;
const long long loo = 1ll << 62;
const int MAXN = 1100005;
const int INF = 0x3f3f3f3f;
inline int read() {
  int f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
queue<int> que;
vector<int> Ans, e[MAXN];
int vis[MAXN], flag[MAXN], Flag[MAXN], d[MAXN], D[MAXN], n, m, k;
int check(long double x) {
  for (int i = 1; i <= n; i++) D[i] = 0;
  for (int i = 1; i <= n; i++)
    if (!flag[i]) {
      for (auto v : e[i]) D[v]++;
      vis[i] = 1, Flag[i] = 0, que.push(i);
    } else
      Flag[i] = 1;
  while (!que.empty()) {
    int q = que.front();
    que.pop();
    vis[q] = 0;
    if (1.0 * D[q] / d[q] > x - eps) continue;
    Flag[q] = 1;
    for (auto v : e[q]) {
      D[v]--;
      if (1.0 * D[v] / d[v] < x - eps && !vis[v] && !Flag[v])
        que.push(v), vis[v] = 1;
    }
  }
  for (int i = 1; i <= n; i++)
    if (!Flag[i]) return 1;
  return 0;
}
signed main() {
  n = read(), m = read(), k = read();
  for (int i = 1; i <= k; i++) flag[read()] = 1;
  for (int i = 1, u, v; i <= m; i++)
    u = read(), v = read(), e[u].push_back(v), e[v].push_back(u), d[u]++,
    d[v]++;
  long double l = 0, r = 1;
  while (r - l > eps) {
    long double mid = (l + r) * 0.5;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  check(l);
  for (int i = 1; i <= n; i++)
    if (!Flag[i]) Ans.push_back(i);
  printf("%d\n", Ans.size());
  for (auto v : Ans) printf("%d ", v);
  return 0;
}
