#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
const int N = 101000;
vector<pair<int, int> > frac;
int deg[N], req[N], vis[N], q[N];
vector<int> blk, ret, e[N];
int u, v, x, n, m, k;
bool cmp(pair<int, int> a, pair<int, int> b) {
  return 1ll * a.first * b.second < 1ll * a.second * b.first;
}
bool pmc(pair<int, int> a, pair<int, int> b) {
  return 1ll * a.first * b.second == 1ll * a.second * b.first;
}
bool check(pair<int, int> fr) {
  for (int i = 1; i < n + 1; i++) deg[i] = ((int)(e[i]).size());
  for (int i = 1; i < n + 1; i++)
    req[i] = (1ll * deg[i] * fr.first + fr.second - 1) / fr.second;
  for (int i = 1; i < n + 1; i++) vis[i] = 0;
  int t = 0;
  for (int i = 0; i < k; i++) vis[q[t++] = blk[i]] = 1;
  for (int i = 0; i < t; i++) {
    u = q[i];
    for (auto v : e[u]) {
      --deg[v];
      if (deg[v] < req[v] && !vis[v]) {
        vis[v] = 1;
        q[t++] = v;
      }
    }
  }
  return t < n;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    scanf("%d", &x);
    blk.push_back(x);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  for (int i = 1; i < n + 1; i++)
    if (((int)(e[i]).size())) {
      for (int j = 0; j < ((int)(e[i]).size()) + 1; j++) {
        frac.push_back(make_pair(j, ((int)(e[i]).size())));
      }
    }
  sort((frac).begin(), (frac).end(), cmp);
  frac.erase(unique((frac).begin(), (frac).end(), pmc), frac.end());
  int l = 0, r = ((int)(frac).size());
  while (l + 1 < r) {
    int md = (l + r) >> 1;
    if (check(frac[md]))
      l = md;
    else
      r = md;
  }
  check(frac[l]);
  for (int i = 1; i < n + 1; i++)
    if (!vis[i]) ret.push_back(i);
  printf("%d\n", ((int)(ret).size()));
  for (auto v : ret) printf("%d ", v);
}
