#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <typename T>
T sqr(T x) {
  return x * x;
}
bool bad[100005], del[100005];
double cond[100005];
vector<int> g[100005];
int n, k;
double eps = 0.0000001;
bool check(double ratio) {
  priority_queue<pair<double, int> > s;
  memset(del, 0, n + 2);
  for (int i = 1; i <= n; i++) {
    if (bad[i]) continue;
    int cnt = 0;
    for (int j = 0; j < g[i].size(); j++) {
      int to = g[i][j];
      if (!bad[to]) cnt++;
    }
    cond[i] = (double)cnt / (double)g[i].size();
    s.push(make_pair(-cond[i], i));
  }
  int rep = n - k;
  while (rep--) {
    pair<double, int> cur = s.top();
    s.pop();
    if (abs(-cur.first - cond[cur.second]) > eps) {
      rep++;
      continue;
    }
    if (-cur.first > ratio - eps) {
      return true;
    }
    int from = cur.second;
    del[from] = 1;
    for (int i = 0; i < g[from].size(); i++) {
      int to = g[from][i];
      if (!bad[to] && !del[to]) {
        cond[to] -= 1.0 / (double)g[to].size();
        s.push(make_pair(-cond[to], to));
      }
    }
  }
  return false;
}
int main() {
  int m;
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int x;
    scanf("%d", &x);
    bad[x] = 1;
  }
  for (int i = 0; i < m; i++) {
    int from, to;
    scanf("%d%d", &from, &to);
    g[from].push_back(to);
    g[to].push_back(from);
  }
  double l = 0, r = 1;
  while ((r - l) > eps) {
    double mid = (l + r) / 2;
    if (check(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  check(l);
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    if (!del[i] && !bad[i]) {
      ans.push_back(i);
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
