#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, m, k, nf, t;
int num[MAXN], oldnum[MAXN];
vector<int> e[MAXN];
bool fort[MAXN], al[MAXN];
set<pair<double, int> > s;
int main(void) {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    fort[x - 1] = 1;
  }
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  for (int i = 0; i < n; i++) {
    if (fort[i]) continue;
    nf++;
    al[i] = 1;
    int cntt = 0;
    for (int j = 0; j < e[i].size(); j++)
      if (!fort[e[i][j]]) cntt++;
    num[i] = cntt;
    oldnum[i] = cntt;
    s.insert(make_pair((double)cntt / (int)e[i].size(), i));
  }
  t = -1;
  double str = s.begin()->first;
  for (int i = 0; i < nf; i++) {
    pair<double, int> curr = *s.begin();
    for (int j = 0; j < e[curr.second].size(); j++) {
      int x = e[curr.second][j];
      if (fort[x] || !al[x]) continue;
      s.erase(make_pair((double)num[x] / (int)e[x].size(), x));
      num[x]--;
      s.insert(make_pair((double)num[x] / (int)e[x].size(), x));
    }
    s.erase(curr);
    al[curr.second] = 0;
    if (i < nf - 1 && s.begin()->first > str) {
      str = s.begin()->first;
      t = i;
    }
  }
  for (int i = 0; i < n; i++)
    if (!fort[i]) {
      al[i] = 1;
      num[i] = oldnum[i];
      s.insert(make_pair((double)num[i] / (int)e[i].size(), i));
    }
  for (int i = 0; i <= t; i++) {
    pair<double, int> curr = *s.begin();
    for (int j = 0; j < e[curr.second].size(); j++) {
      int x = e[curr.second][j];
      if (fort[x] || !al[x]) continue;
      s.erase(make_pair((double)num[x] / (int)e[x].size(), x));
      num[x]--;
      s.insert(make_pair((double)num[x] / (int)e[x].size(), x));
    }
    s.erase(curr);
    al[curr.second] = 0;
  }
  cout << s.size() << endl;
  for (set<pair<double, int> >::iterator it = s.begin(); it != s.end(); it++)
    cout << it->second + 1 << ' ';
  cout << endl;
  return 0;
}
