#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
int dblcmp(double d) {
  if (fabs(d) < eps) return 0;
  return d > eps ? 1 : -1;
}
vector<int> g[111111];
int n, m, d;
int o[111111] = {0}, v[111111];
bool que[111111];
int main() {
  int i, j, k, ii;
  cin >> n >> m >> d;
  for (i = 0; i < d; i++) {
    scanf("%d", &k);
    o[k] = 1;
  }
  for (i = 0; i < m; i++) {
    int q, w;
    scanf("%d%d", &q, &w);
    g[q].push_back(w);
    g[w].push_back(q);
  }
  double low = 0, high = 1, mid;
  int cnt = 100;
  vector<int> ans;
  while (cnt--) {
    mid = (low + high) / 2.0;
    memset((v), 0, sizeof(v));
    memcpy(v, o, sizeof(o));
    queue<int> q;
    memset((que), 0, sizeof(que));
    for (i = 1; i <= n; i++)
      if (!v[i]) {
        q.push(i);
        que[i] = 1;
      }
    while (!q.empty()) {
      int t = q.front();
      q.pop();
      que[t] = 0;
      int v1 = 0, v2 = 0;
      for (__typeof(g[t].begin()) e = g[t].begin(); e != g[t].end(); ++e) {
        v2++;
        if (!v[*e]) v1++;
      }
      if (dblcmp(v1 * 1.0 / v2 - mid) < 0) {
        v[t] = 1;
        for (__typeof(g[t].begin()) e = g[t].begin(); e != g[t].end(); ++e) {
          if (!que[*e] && !v[*e]) {
            que[*e] = 1;
            q.push(*e);
          }
        }
      }
    }
    if (count(v + 1, v + n + 1, 0)) {
      low = mid;
      ans.clear();
      for (i = 1; i <= n; i++)
        if (!v[i]) ans.push_back(i);
    } else {
      high = mid;
    }
  }
  printf("%d\n", (int)((ans).size()));
  for (__typeof(ans.begin()) e = ans.begin(); e != ans.end(); ++e)
    printf("%d ", *e);
  puts("");
  return 0;
}
