#include <bits/stdc++.h>
using namespace std;
template <class X, class Y>
void amax(X& x, const Y& y) {
  if (x < y) x = y;
}
template <class X, class Y>
void amin(X& x, const Y& y) {
  if (x > y) x = y;
}
const int INF = 1e9 + 10;
const long long INFL = 1e18 + 10;
const int MAX = 1e5 + 10;
int n, m, k;
bool imp[MAX], mark[MAX];
vector<int> es[MAX];
int cnt[MAX];
void process() {
  cin >> n >> m >> k;
  for (int i = 1; i <= k; i++) {
    int x;
    cin >> x;
    imp[x] = true;
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    es[u].push_back(v);
    es[v].push_back(u);
  }
  priority_queue<pair<long double, int>, vector<pair<long double, int>>,
                 greater<pair<long double, int>>>
      pq;
  for (int i = 1; i <= n; i++) {
    if (!imp[i]) {
      for (auto v : es[i]) {
        if (!imp[v]) cnt[i]++;
      }
      mark[i] = true;
      pq.push(make_pair((long double)cnt[i] / es[i].size(), i));
    }
  }
  long double res = 0;
  while (!pq.empty()) {
    long double vv = pq.top().first;
    int u = pq.top().second;
    pq.pop();
    if (!mark[u]) continue;
    mark[u] = false;
    amax(res, vv);
    for (auto v : es[u])
      if (mark[v]) {
        cnt[v]--;
        pq.push(make_pair((long double)cnt[v] / es[v].size(), v));
      }
  }
  memset(cnt, 0, sizeof(cnt));
  memset(mark, false, sizeof(mark));
  for (int i = 1; i <= n; i++) {
    if (!imp[i]) {
      for (auto v : es[i]) {
        if (!imp[v]) cnt[i]++;
      }
      mark[i] = true;
      pq.push(make_pair((long double)cnt[i] / es[i].size(), i));
    }
  }
  vector<int> ans;
  while (!pq.empty()) {
    long double vv = pq.top().first;
    int u = pq.top().second;
    pq.pop();
    if (!mark[u]) continue;
    mark[u] = false;
    if (res == vv) {
      ans.push_back(u);
      break;
    }
    for (auto v : es[u])
      if (mark[v]) {
        cnt[v]--;
        pq.push(make_pair((long double)cnt[v] / es[v].size(), v));
      }
  }
  while (!pq.empty()) {
    int u = pq.top().second;
    pq.pop();
    if (!mark[u]) continue;
    mark[u] = false;
    ans.push_back(u);
  }
  cout << ans.size() << '\n';
  for (auto x : ans) cout << x << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  process();
}
