#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-12;
const int MAXN = 100005;
int N, M, K, A, B;
int need[MAXN], use[MAXN], del[MAXN];
vector<int> fort, adj[MAXN];
vector<int> check(long double k) {
  memset(use, 0, sizeof(use));
  memset(del, 0, sizeof(del));
  for (int i = 0; i < N; i++) {
    need[i] = int(adj[i].size() * k + 1 - EPS);
  }
  queue<int> rem;
  for (int f : fort) {
    rem.push(f);
    del[f] = 1;
  }
  while (rem.size()) {
    int v = rem.front();
    rem.pop();
    for (int n : adj[v]) {
      if (del[n]) continue;
      use[n] += 1;
      if (need[n] + use[n] > adj[n].size()) {
        rem.push(n);
        del[n] = 1;
      }
    }
  }
  vector<int> res;
  for (int i = 0; i < N; i++) {
    if (!del[i]) {
      res.push_back(i);
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> N >> M >> K;
  for (int i = 0; i < K; i++) {
    cin >> A;
    A -= 1;
    fort.push_back(A);
  }
  for (int i = 0; i < M; i++) {
    cin >> A >> B;
    A -= 1, B -= 1;
    adj[A].push_back(B);
    adj[B].push_back(A);
  }
  long double lo = 0, hi = 1;
  while (hi - lo > EPS) {
    long double mid = (lo + hi) / 2;
    vector<int> v = check(mid);
    (v.size() ? lo : hi) = mid;
  }
  vector<int> res = check(lo);
  cout << res.size() << '\n';
  for (int x : res) {
    cout << x + 1 << " ";
  }
  cout << '\n';
}
