#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<double, int> > q;
vector<int> v[100010];
int mark[100010] = {0};
int cnt[100010] = {0};
int deg[100010] = {0};
vector<int> order;
void convert(int cur) {
  for (auto x : v[cur]) {
    if (mark[x]) continue;
    cnt[x]--;
    q.push(make_pair(-((double)cnt[x]) / deg[x], x));
  }
  mark[cur] = 1;
}
int main() {
  int n, m, k, i, j, maxc;
  double maxx = -1;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  for (i = 0; i < k; ++i) {
    int x;
    scanf("%d", &x);
    mark[x] = 1;
  }
  for (i = 0; i < m; ++i) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (i = 1; i <= n; ++i) {
    cnt[i] = deg[i] = (int)v[i].size();
    q.push(make_pair(-1, i));
  }
  for (i = 1; i <= n; ++i) {
    if (!mark[i]) continue;
    convert(i);
    order.push_back(i);
  }
  while (!q.empty()) {
    pair<double, int> p = q.top();
    q.pop();
    if (mark[p.second]) continue;
    if (-p.first > maxx) {
      maxx = -p.first;
      maxc = (int)order.size();
    }
    convert(p.second);
    order.push_back(p.second);
  }
  printf("%d\n", n - maxc);
  for (i = maxc; i < n; ++i) printf("%d ", order[i]);
}
