#include <bits/stdc++.h>
using namespace std;
const double EPS = 1E-8;
const int MAXN = 100100;
int N, M, K;
int F[MAXN];
vector<int> adj[MAXN];
int cnt[MAXN];
vector<int> ans;
bool check(double avg) {
  memset(cnt, 0, sizeof(cnt));
  queue<int> q;
  for (int i = 0; i < N; i++) {
    int num = (int)(avg * adj[i].size());
    if (avg * adj[i].size() - num > EPS) num++;
    cnt[i] = adj[i].size() - num;
  }
  for (int i = 0; i < K; i++) {
    q.push(F[i]);
    cnt[F[i]] = -1;
  }
  int total = 0;
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    total++;
    for (int i = 0; i < adj[cur].size(); i++) {
      int next = adj[cur][i];
      cnt[next]--;
      if (cnt[next] == -1) q.push(next);
    }
  }
  return total < N;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> N >> M >> K;
  for (int i = 0; i < K; i++) {
    cin >> F[i];
    F[i]--;
  }
  for (int i = 0, a, b; i < M; i++) {
    cin >> a >> b;
    a--, b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  double lo = 0, hi = 1;
  while (hi - lo > EPS) {
    double mid = (lo + hi) / 2;
    if (check(mid))
      lo = mid;
    else
      hi = mid;
  }
  check(lo);
  for (int i = 0; i < N; i++)
    if (cnt[i] >= 0) ans.push_back(i + 1);
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
