#include <bits/stdc++.h>
using namespace std;
vector<int> a[100002], w;
bool v[100002];
int vs[100002], vt[100002];
struct elem {
  int nod, x, y;
};
inline bool cmp(const elem &a, const elem &b) {
  if ((double)a.x / a.y == (double)b.x / b.y) return a.nod < b.nod;
  return (double)a.x / a.y < (double)b.x / b.y;
}
set<elem, bool (*)(const elem &, const elem &)> s(cmp);
set<elem>::iterator ss;
int main() {
  int n, m, k, i, x, y, l, j;
  double maxim = 0;
  elem p, q;
  cin >> n >> m >> k;
  for (i = 1; i <= k; i++) cin >> x, v[x] = 1;
  for (i = 1; i <= m; i++) {
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (i = 1; i <= n; i++)
    if (v[i] == 0) {
      l = a[i].size();
      k = 0;
      for (j = 0; j < l; j++) k += v[a[i][j]];
      s.insert({i, l - k, l});
      vs[i] = l - k;
      vt[i] = l;
    }
  while (!s.empty()) {
    p = {s.begin()->nod, s.begin()->x, s.begin()->y};
    v[s.begin()->nod] = 1;
    s.erase(s.begin());
    if ((double)p.x / p.y > maxim) {
      maxim = (double)p.x / p.y;
      w.clear();
    }
    w.push_back(p.nod);
    l = a[p.nod].size();
    for (i = 0; i < l; i++)
      if (v[a[p.nod][i]] == 0) {
        q = {a[p.nod][i], vs[a[p.nod][i]], vt[a[p.nod][i]]};
        ss = s.find(q);
        if (ss != s.end()) {
          s.erase(ss);
          s.insert({q.nod, q.x - 1, q.y});
          vs[q.nod]--;
        }
      }
  }
  l = w.size();
  cout << l << '\n';
  for (i = 0; i < l; i++) cout << w[i] << " ";
  return 0;
}
