#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("O3", "omit-frame-pointer", "inline")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2")
using namespace std;
const long long mod = 998244353;
mt19937 rng((int)chrono::steady_clock::now().time_since_epoch().count());
const int mxN = 100010;
int n;
vector<int> g[mxN];
bool fort[mxN];
int cur[mxN];
bool keep = false;
pair<int, int> rate;
bool in[mxN];
pair<int, int> solve() {
  pair<int, int> res = {0, n};
  auto cmp_frac = [](pair<int, int> a, pair<int, int> b) {
    return a.first * 1ll * b.second < a.second * 1ll * b.first;
  };
  auto cmp = [cmp_frac](pair<int, pair<int, int>> a,
                        pair<int, pair<int, int>> b) {
    if (!cmp_frac(a.second, b.second) && !cmp_frac(b.second, a.second))
      return a.first < b.first;
    return cmp_frac(a.second, b.second);
  };
  set<pair<int, pair<int, int>>, decltype(cmp)> pq(cmp);
  int have = 0;
  for (int u = 0; u < n; u++)
    if (!fort[u]) {
      cur[u] = 0;
      have++;
      in[u] = true;
      for (auto v : g[u]) cur[u] += !fort[v];
      pq.insert({u, {cur[u], (int)g[u].size()}});
    }
  while (!pq.empty()) {
    auto u = pq.begin()->first;
    auto r = pq.begin()->second;
    pq.erase(pq.begin());
    if (!in[u]) continue;
    if (cmp_frac(res, r)) res = r;
    if (keep && res == rate) {
      cout << have << '\n';
      for (int v = 0; v < n; v++)
        if (in[v]) cout << v + 1 << ' ';
      cout << '\n';
      exit(0);
    }
    in[u] = false;
    have--;
    for (auto v : g[u]) {
      if (fort[v] || !in[v]) continue;
      cur[v]--;
      pq.insert({v, {cur[v], (int)g[v].size()}});
    }
  }
  return res;
}
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  srand(time(NULL));
  cout << fixed << setprecision(9);
  int t = 1, C = 1;
  while (t--) {
    int m, k;
    cin >> n >> m >> k;
    for (int i = 0, u; i < k; i++) {
      cin >> u;
      u--;
      fort[u] = true;
    }
    for (int i = 0, u, v; i < m; i++) {
      cin >> u >> v;
      u--, v--;
      g[u].push_back(v);
      g[v].push_back(u);
    }
    rate = solve();
    keep = true;
    solve();
    assert(false);
  }
  return 0;
}
