#include <bits/stdc++.h>
using namespace std;
const int max_n = 100 * 1000;
bool fort[max_n];
vector<int> adj[max_n];
int Size[max_n], cnt[max_n], tmp_cnt[max_n];
bool ok[max_n];
queue<int> Q;
vector<int> ans;
const double eps = 1e-6;
bool can(const double r, const int n) {
  for (int i = 0; i < (n); i++) tmp_cnt[i] = cnt[i];
  memset(ok, false, sizeof false);
  for (int i = 0; i < (n); i++)
    if (!fort[i]) {
      if (double(tmp_cnt[i]) / Size[i] < r)
        Q.push(i);
      else
        ok[i] = true;
    }
  for (; Q.size(); Q.pop()) {
    int at = Q.front();
    for (int i = 0; i < (adj[at].size()); i++) {
      int to = adj[at][i];
      tmp_cnt[to]--;
      if (ok[to] && double(tmp_cnt[to]) / Size[to] < r) {
        ok[to] = false;
        Q.push(to);
      }
    }
  }
  for (int i = 0; i < (n); i++)
    if (ok[i]) return true;
  return false;
}
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  memset(fort, false, sizeof fort);
  for (int i = 0; i < (k); i++) {
    int x;
    scanf("%d", &x);
    x--;
    fort[x] = true;
  }
  memset(Size, 0, sizeof Size);
  memset(cnt, 0, sizeof cnt);
  for (int i = 0; i < (m); i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--, b--;
    if (!fort[a] && !fort[b]) {
      adj[a].push_back(b), adj[b].push_back(a);
      cnt[a]++, cnt[b]++;
    }
    Size[a]++, Size[b]++;
  }
  double lb = -1, ub = 1 + eps;
  for (int t = 0; t < (100); t++) {
    double mid = (lb + ub) / 2;
    if (can(mid, n))
      lb = mid;
    else
      ub = mid;
  }
  can(lb, n);
  for (int i = 0; i < (n); i++)
    if (ok[i]) ans.push_back(i + 1);
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (ans.size()); i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
