#include <bits/stdc++.h>
using namespace std;
struct city {
  bool fort = false;
  int gcon = 0;
  int tcon = 0;
  int t_gcon;
  int t_tcon;
  void reset() {
    t_gcon = gcon;
    fort = false;
  }
  void set() { gcon = t_gcon; }
  vector<int> con;
};
int n, m, q, n_left;
city country[100111];
struct comp {
  int gcon;
  int tcon;
  int i;
  comp(int _i, city &a) {
    gcon = a.gcon;
    tcon = a.tcon;
    i = _i;
  }
  bool operator<(const comp &o) const {
    return ((long long)gcon * o.tcon > (long long)o.gcon * tcon);
  }
};
bool valid(comp x) {
  return (x.gcon == country[x.i].gcon && !country[x.i].fort);
}
priority_queue<comp> prio;
vector<int> dec_try;
void dfs(int a, int &left, int &g_p, int &t_p) {
  if (!country[a].fort) {
    if (country[a].gcon == country[a].t_gcon) {
      dec_try.push_back(a);
    }
    --country[a].t_gcon;
    if ((long long)country[a].t_gcon * t_p <=
        (long long)g_p * country[a].tcon) {
      --left;
      country[a].fort = true;
      for (int b : country[a].con) {
        dfs(b, left, g_p, t_p);
      }
    }
  }
}
int main() {
  scanf("%u %u %u", &n, &m, &q);
  for (int i = 0; i < q; ++i) {
    int k;
    scanf("%u", &k);
    country[k].fort = true;
  }
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%u %u", &a, &b);
    ++country[a].tcon;
    ++country[b].tcon;
    if (!country[a].fort && !country[b].fort) {
      ++country[b].gcon;
      ++country[a].gcon;
      country[b].con.push_back(a);
      country[a].con.push_back(b);
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (!country[i].fort) {
      prio.emplace(i, country[i]);
      country[i].reset();
    }
  }
  n_left = n - q;
  while (true) {
    while (!valid(prio.top())) {
      prio.pop();
    }
    int left = n_left;
    comp a = prio.top();
    prio.pop();
    dfs(a.i, left, a.gcon, a.tcon);
    if (left == 0) {
      for (int v : dec_try) {
        country[v].reset();
      }
      break;
    }
    while (!dec_try.empty()) {
      country[dec_try.back()].set();
      if (!country[dec_try.back()].fort) {
        prio.emplace(dec_try.back(), country[dec_try.back()]);
      }
      dec_try.pop_back();
    }
    n_left = left;
  }
  printf("%d\n", n_left);
  for (int i = 1; i <= n; ++i) {
    if (!country[i].fort) {
      printf("%d ", i);
    }
  }
  printf("\n");
  return 0;
}
