#include <bits/stdc++.h>
int n, m, k;
int main() {
  void set_bad(int v);
  void add_edge(int u, int v);
  void preprocess();
  int check(double mid);
  void print();
  double low, high, mid;
  int u, v;
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &v);
    set_bad(v);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d %d", &u, &v);
    if (u == v) continue;
    add_edge(u, v);
    add_edge(v, u);
  }
  preprocess();
  low = 0.0;
  high = 1.0;
  for (int i = 1; i <= 100; i++) {
    mid = (low + high) / 2;
    if (check(mid)) {
      low = mid;
    } else {
      high = mid;
    }
  }
  print();
  return 0;
}
typedef struct VERTEX {
  std::set<struct VERTEX*> adj;
  int index;
  int is_bad;
  int deg;
  int enemy;
  int fri;
} VERTEX, *VERTEX_PTR;
VERTEX vert[100009];
void set_bad(int v) { vert[v].is_bad = 1; }
void add_edge(int u, int v) { vert[u].adj.insert(&vert[v]); }
void preprocess() {
  for (int i = 1; i <= n; i++) {
    VERTEX_PTR v = &vert[i];
    v->index = i;
    if (!v->is_bad) {
      v->deg = v->adj.size();
      for (std::set<VERTEX_PTR>::iterator vptr = v->adj.begin();
           vptr != v->adj.end(); vptr++)
        if ((*vptr)->is_bad) v->enemy++;
    }
  }
}
int g[100009], gsize;
std::vector<int> ans;
std::queue<VERTEX_PTR> q;
int check(double mid) {
  double safe_val(VERTEX_PTR v);
  void give_up(VERTEX_PTR u);
  int found;
  gsize = 0;
  for (int i = 1; i <= n; i++) {
    VERTEX_PTR v = &vert[i];
    if (!v->is_bad) {
      v->fri = v->deg - v->enemy;
      g[i] = 1;
      gsize++;
    }
  }
  for (int i = 1; i <= n; i++) {
    VERTEX_PTR v = &vert[i];
    if (g[i] && safe_val(v) < mid) {
      q.push(v);
      g[i] = 0;
      gsize--;
    }
  }
  while (!q.empty()) {
    VERTEX_PTR u = q.front();
    q.pop();
    for (std::set<VERTEX_PTR>::iterator vptr = u->adj.begin();
         vptr != u->adj.end(); vptr++) {
      VERTEX_PTR v = *vptr;
      if (g[v->index]) {
        v->fri--;
        if (safe_val(v) < mid) {
          q.push(v);
          g[v->index] = 0;
          gsize--;
        }
      }
    }
  }
  if (gsize > 0) {
    ans.clear();
    for (int i = 1; i <= n; i++)
      if (g[i]) ans.push_back(i);
  }
  return (gsize > 0);
}
double safe_val(VERTEX_PTR v) {
  if (v->fri == 0)
    return 1e-8;
  else
    return (double)v->fri / (double)v->deg;
}
void print() {
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d ", ans[i]);
  }
}
