#include <bits/stdc++.h>
using namespace std;
struct frac {
  int p, q;
  frac() {}
  frac(int _p, int _q) : p(_p), q(_q) {}
};
bool operator<(const frac& a, const frac& b) {
  return a.p * 1ll * b.q < b.p * 1ll * a.q;
}
int n, m, k;
set<pair<frac, int> > s;
frac best = frac(0, 1);
vector<char> fort;
vector<char> alive;
vector<list<int> > gr;
vector<frac> cs;
int del = 0, bdel = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  scanf("%d%d%d", &n, &m, &k);
  gr.resize(n);
  cs.resize(n);
  fort.resize(n);
  alive.resize(n);
  fort.assign(n, false);
  alive.assign(n, true);
  for (auto i = 0; i != k; i++) {
    int v;
    scanf("%d", &v);
    v--;
    fort[v] = true;
  }
  for (auto i = 0; i != m; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    v--;
    u--;
    gr[v].push_back(u);
    gr[u].push_back(v);
  }
  for (auto i = 0; i != n; i++) {
    int ne = gr[i].size();
    int g = 0;
    for (auto u : gr[i])
      if (!fort[u]) g++;
    cs[i] = frac(g, ne);
    if (!fort[i])
      s.insert(make_pair(cs[i], i));
    else
      alive[i] = false;
  }
  while (!s.empty()) {
    if (best < s.begin()->first) {
      best = s.begin()->first;
      bdel = del;
    }
    del++;
    int v = s.begin()->second;
    s.erase(s.begin());
    alive[v] = false;
    for (auto u : gr[v])
      if (alive[u]) {
        s.erase(make_pair(cs[u], u));
        cs[u] = frac(cs[u].p - 1, cs[u].q);
        s.insert(make_pair(cs[u], u));
      }
  }
  alive.assign(n, true);
  for (auto i = 0; i != n; i++) {
    int ne = gr[i].size();
    int g = 0;
    for (auto u : gr[i])
      if (!fort[u]) g++;
    cs[i] = frac(g, ne);
    if (!fort[i])
      s.insert(make_pair(cs[i], i));
    else
      alive[i] = false;
  }
  del = 0;
  while (!s.empty()) {
    if (del == bdel) {
      printf("%d\n", (int)s.size());
      for (auto v : s) printf("%d ", v.second + 1);
      return 0;
    }
    del++;
    int v = s.begin()->second;
    s.erase(s.begin());
    alive[v] = false;
    for (auto u : gr[v])
      if (alive[u]) {
        s.erase(make_pair(cs[u], u));
        cs[u] = frac(cs[u].p - 1, cs[u].q);
        s.insert(make_pair(cs[u], u));
      }
  }
  return 0;
}
