#include <bits/stdc++.h>
using namespace std;
const int N = 100003;
const double eps = 1.e-14;
class MyComp {
 public:
  bool operator()(const pair<int, double> &A, const pair<int, double> &B) {
    if (A.second - B.second > eps) return 1;
    return 0;
  }
};
vector<int> graph[N];
priority_queue<pair<int, double>, vector<pair<int, double> >, MyComp> pq;
int n, m, k, grad[N];
bool used[N], f[N], sol[N];
int main() {
  int i, x, num, nod, y, flag = 0;
  vector<int>::iterator it;
  pair<int, double> temp;
  double score, scoremin, ans;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 1; i <= k; i++) {
    scanf("%d", &x);
    f[x] = 1;
  }
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    graph[x].push_back(y);
    graph[y].push_back(x);
  }
  scoremin = 2;
  for (i = 1; i <= n; i++)
    if (f[i] == 0) {
      num = 0;
      for (it = graph[i].begin(); it != graph[i].end(); ++it)
        if (f[*it] == 0) num++;
      score = (double)num / graph[i].size();
      grad[i] = num;
      pq.push(make_pair(i, score));
    }
  ans = pq.top().second;
  memcpy(sol, f, sizeof(sol));
  while (!pq.empty()) {
    temp = pq.top();
    pq.pop();
    nod = temp.first;
    if (used[nod]) continue;
    scoremin = temp.second;
    if (scoremin - ans > eps) {
      ans = scoremin;
      memcpy(sol, f, sizeof(sol));
    }
    used[nod] = 1;
    f[nod] = 1;
    for (it = graph[nod].begin(); it != graph[nod].end(); ++it)
      if (f[*it] == 0) {
        grad[(*it)]--;
        score = (double)grad[(*it)] / graph[(*it)].size();
        pq.push(make_pair((*it), score));
      }
  }
  num = 0;
  for (i = 1; i <= n; i++)
    if (sol[i] == 0) ++num;
  printf("%d\n", num);
  for (i = 1; i <= n; i++)
    if (sol[i] == 0) printf("%d ", i);
  printf("\n");
  return 0;
}
