#include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> G[123456];
vector<int> lisst, blo;
long long d, q;
int iii;
long long s[124567];
struct cmp {
  bool operator()(int i, int j) {
    long long x = (int(G[j].size()));
    x *= s[i];
    long long y = (int(G[i].size()));
    y *= s[j];
    if (x == y) return i < j;
    return x < y;
  }
};
set<int, cmp> secik;
int main() {
  cin >> n >> m >> k;
  int a, b;
  for (int x = 0; x < (k); ++x) {
    cin >> b;
    blo.push_back(b);
  }
  for (int x = 0; x < (m); ++x) {
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 1; i <= (n); ++i) {
    s[i] = (int(G[i].size()));
  }
  for (int i = 0; i <= (k - 1); ++i)
    for (int j = 0; j <= ((int(G[blo[i]].size())) - 1); ++j) s[G[blo[i]][j]]--;
  for (int i = 1; i <= (n); ++i) secik.insert(i);
  for (int i = 0; i <= (k - 1); ++i) secik.erase(secik.find(blo[i]));
  iii = -1;
  d = -1;
  q = 1;
  int xx, yy;
  set<int>::iterator it;
  for (int i = 0; i <= (n - k - 1); ++i) {
    xx = *secik.begin();
    secik.erase(secik.begin());
    lisst.push_back(xx);
    if ((d * (int(G[xx].size()))) < (q * s[xx])) {
      iii = i;
      d = s[xx];
      q = (int(G[xx].size()));
    }
    for (int j = 0; j <= ((int(G[xx].size())) - 1); ++j) {
      yy = G[xx][j];
      it = secik.find(yy);
      if (it == secik.end()) continue;
      secik.erase(it);
      s[yy]--;
      secik.insert(yy);
    }
  }
  cout << n - k - iii << endl;
  for (int i = iii; i <= (n - k - 1); ++i) cout << lisst[i] << " ";
}
