#include <bits/stdc++.h>
using namespace std;
const int NMax = 110000;
struct edge {
  int num;
  edge *next;
} * G[NMax], pool[NMax * 2];
int N, M, K, cant[NMax], L, deg[NMax], cnt[NMax], del[NMax], cur[NMax];
void Build(int x, int y) {
  edge *p = &pool[L++], *q = &pool[L++];
  p->num = y;
  p->next = G[x];
  G[x] = p;
  q->num = x;
  q->next = G[y];
  G[y] = q;
}
void DFS(int a, long double k) {
  for (edge *p = G[a]; p; p = p->next)
    if (!del[p->num]) cur[p->num]--;
  for (edge *p = G[a]; p; p = p->next)
    if (!del[p->num]) {
      if ((long double)cur[p->num] / (long double)deg[p->num] < k) {
        del[p->num] = 1;
        DFS(p->num, k);
      }
    }
}
int main() {
  scanf("%d%d%d", &N, &M, &K);
  for (int i = 1; i <= K; i++) {
    int x;
    scanf("%d", &x);
    cant[x] = 1;
  }
  for (int i = 1; i <= M; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    Build(x, y);
    deg[x]++;
    deg[y]++;
  }
  for (int i = 1; i <= N; i++)
    if (!cant[i])
      for (edge *p = G[i]; p; p = p->next)
        if (!cant[p->num]) cnt[i]++;
  long double l = -1e-4f, r = 1.0;
  while (l + 1e-6f < r) {
    long double mid = (l + r) / 2;
    for (int i = 1; i <= N; i++) del[i] = cant[i], cur[i] = cnt[i];
    for (int i = 1; i <= N; i++)
      if (!del[i]) {
        if ((long double)cur[i] / (long double)deg[i] < mid) {
          del[i] = 1;
          DFS(i, mid);
        }
      }
    int flag = 0;
    for (int i = 1; i <= N; i++)
      if (!del[i]) flag = 1;
    if (flag)
      l = mid;
    else
      r = mid;
  }
  for (int i = 1; i <= N; i++) del[i] = cant[i], cur[i] = cnt[i];
  for (int i = 1; i <= N; i++)
    if (!del[i]) {
      if ((long double)cur[i] / (long double)deg[i] < l) {
        del[i] = 1;
        DFS(i, l);
      }
    }
  int ans = 0;
  for (int i = 1; i <= N; i++)
    if (!del[i]) ans++;
  printf("%d\n", ans);
  for (int i = 1; i <= N; i++)
    if (!del[i]) printf("%d ", i);
  puts("");
  getchar();
  getchar();
  return 0;
}
