#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
int n, m, k, q[mx];
vector<int> e[mx];
bool fort[mx];
vector<int> check(double r) {
  queue<int> s;
  vector<int> k(n + 1, 0);
  vector<bool> in(n + 1, false);
  for (int i = 1; i <= n; i++) k[i] = e[i].size(), in[i] = !fort[i];
  for (int i = 1; i <= n; i++) {
    if (fort[i]) continue;
    if ((double)k[i] / (double)q[i] < r) {
      s.push(i);
      in[i] = false;
    }
  }
  while (!s.empty()) {
    int x = s.front();
    s.pop();
    for (auto it : e[x]) {
      if (!in[it]) continue;
      if ((double)(--k[it]) / (double)q[it] < r) {
        s.push(it);
        in[it] = false;
      }
    }
  }
  vector<int> ret;
  for (int i = 1; i <= n; i++) {
    if (in[i]) ret.push_back(i);
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m >> k;
  for (int i = 1; i <= k; i++) {
    int x;
    cin >> x;
    fort[x] = true;
  }
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    q[x]++;
    q[y]++;
    if (!fort[x] && !fort[y]) {
      e[x].push_back(y);
      e[y].push_back(x);
    }
  }
  double l = 0.0, r = 1.0;
  int count = 50;
  while (count--) {
    double mid = (l + r) / 2;
    if (check(mid).size())
      l = mid;
    else
      r = mid;
  }
  vector<int> sol = check(l);
  cout << sol.size() << "\n";
  for (auto it : sol) cout << it << " ";
}
