#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int N, M, K;
vector<int> tab[100009];
int fortresses[100009];
int inset[100009];
int test(double ratio) {
  queue<int> q;
  int num_in_set = N - K;
  static int in[100009];
  for (int i = 1; i <= N; i++) {
    inset[i] = 1;
    in[i] = tab[i].size();
  }
  for (int i = 0; i < K; i++) {
    int f = fortresses[i];
    in[f] = 1;
    q.push(f);
    inset[f] = 0;
    for (int j = 0; j < tab[f].size(); j++) in[tab[f][j]]--;
  }
  while (!q.empty()) {
    int h = q.front();
    q.pop();
    for (int i = 0; i < tab[h].size(); i++) {
      int x = tab[h][i];
      if (!inset[x]) continue;
      if ((double)in[x] / tab[x].size() < ratio) {
        num_in_set--;
        inset[x] = 0;
        for (int j = 0; j < tab[x].size(); j++) in[tab[x][j]]--;
        q.push(x);
      }
    }
  }
  return num_in_set;
}
int main() {
  scanf("%d%d%d", &N, &M, &K);
  for (int i = 0; i < K; i++) scanf("%d", &fortresses[i]);
  for (int i = 0; i < M; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    tab[a].push_back(b);
    tab[b].push_back(a);
  }
  double begin = 0, end = 1, mid;
  while (end - begin > eps) {
    mid = (begin + end) / 2;
    if (test(mid))
      begin = mid;
    else
      end = mid;
  }
  test(begin);
  int ans = 0;
  for (int i = 1; i <= N; i++) ans += inset[i];
  printf("%d\n", ans);
  for (int i = 1; i <= N; i++)
    if (inset[i]) printf("%d ", i);
  printf("\n");
  return 0;
}
