#include <bits/stdc++.h>
using namespace std;
vector<long long> original_bad;
vector<long long> gr[100101];
vector<long long> left_good;
long long nb_good[100101];
bool bad[100101];
double threshold[100101];
long long n, m, k;
double EPS = 1e-8;
bool isGood(double share_good) {
  queue<long long> q;
  gr[n].size() * share_good;
  for (long long i = 1; i <= n; i++) {
    nb_good[i] = gr[i].size();
    threshold[i] = gr[i].size() * share_good;
    bad[i] = false;
  }
  for (long long v : original_bad) {
    bad[v] = true;
    q.push(v);
  }
  while (!q.empty()) {
    long long v = q.front();
    q.pop();
    for (long long u : gr[v])
      if (--nb_good[u] < threshold[u] && !bad[u]) {
        bad[u] = true;
        q.push(u);
      }
  }
  left_good.clear();
  for (long long i = 1; i <= n; i++)
    if (!bad[i]) left_good.push_back(i);
  return !left_good.empty();
}
int main() {
  ios_base::sync_with_stdio(false);
  long long u, v;
  cin >> n >> m >> k;
  for (long long i = 0; i < k; i++) {
    long long v;
    cin >> v;
    original_bad.push_back(v);
  }
  for (long long i = 0; i < m; i++) {
    cin >> u >> v;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  double l = 0, r = 1, m;
  while (r - l > EPS) {
    m = (l + r) / 2;
    (isGood(m) ? l : r) = m;
  }
  isGood(l);
  cout << left_good.size() << "\n";
  for (long long u : left_good) cout << u << " ";
  return 0;
}
