#include <bits/stdc++.h>
using namespace std;
struct frac {
  long long a, b;
  frac() {}
  frac(long long a, long long b) : a(a), b(b) {}
  bool operator<(const frac &f) const { return a * f.b > b * f.a; }
};
int n, m, k;
bool f[100010], rem[100010], vis[100010];
vector<int> e[100010];
int c[100010];
vector<int> buf, ans;
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int ff;
    cin >> ff;
    f[ff] = 1;
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    e[a].push_back(b);
    e[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    c[i] = e[i].size();
  }
  for (int i = 1; i <= n; i++) {
    if (f[i]) {
      for (int v : e[i]) {
        c[v]--;
      }
    }
  }
  priority_queue<pair<frac, int> > pq;
  for (int i = 1; i <= n; i++) {
    if (!f[i]) {
      pq.push(make_pair(frac(c[i], e[i].size()), i));
    }
  }
  frac best = frac(0, 1);
  while (!pq.empty()) {
    long long a = pq.top().first.a, u = pq.top().second;
    pq.pop();
    if (a != c[u]) continue;
    long long b = e[u].size();
    if (a * best.b > best.a * b) {
      for (int v : buf) {
        rem[v] = 1;
      }
      buf.clear();
      best = frac(a, b);
    }
    vis[u] = 1;
    buf.push_back(u);
    for (int v : e[u]) {
      if (f[v] || vis[v]) continue;
      c[v]--;
      pq.push(make_pair(frac(c[v], e[v].size()), v));
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!f[i] && !rem[i]) ans.push_back(i);
  }
  cout << ans.size() << '\n';
  for (int v : ans) cout << v << ' ';
}
