#include <bits/stdc++.h>
using namespace std;
int d[100005], h[100005], n, m, k;
vector<int> u[100005], b, t;
bool f(long double r) {
  for (int i = (1); i < (n + 1); i++)
    d[i] = int(u[i].size()), h[i] = ceil(r * d[i] - 1e-12);
  queue<int> s;
  for (int x : b) s.push(x), d[x] = 1e9;
  while (!s.empty()) {
    for (int x : u[s.front()])
      if (--d[x] < h[x]) s.push(x), d[x] = 1e9;
    s.pop();
  }
  t.clear();
  for (int i = (1); i < (n + 1); i++)
    if (d[i] < 1e8) t.push_back(i);
  return int(t.size());
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  b.resize(k);
  for (int &x : b) scanf("%d", &x);
  for (int i = (0); i < (m); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    u[x].push_back(y);
    u[y].push_back(x);
  }
  long double s = 0, e = 1, m;
  while (e - s > 1e-12) (f(m = (s + e) / 2) ? s : e) = m;
  f(s - 1e-12);
  printf("%d\n", int(t.size()));
  for (int i = (0); i < (int(t.size())); i++)
    printf("%d%c", t[i], " \n"[i + 1 == int(t.size())]);
}
