#include <bits/stdc++.h>
using namespace std;
int N, M, K;
vector<int> A;
vector<vector<int> > edges;
set<int> sols;
bool solve(long double mid, bool a = false) {
  vector<int> B(N + 1);
  set<int> possible;
  for (int x = 1; x <= N; x++) possible.insert(x);
  for (int x = 0; x < K; x++) {
    B[A[x]] = -1;
    possible.erase(A[x]);
    for (int v : edges[A[x]])
      if (B[v] != -1) B[v]++;
  }
  queue<int> q;
  for (int u : possible) {
    if (((long double)(edges[u].size() - B[u])) /
            ((long double)edges[u].size()) <
        mid)
      q.push(u), B[u] = -1;
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    possible.erase(u);
    for (int v : edges[u]) {
      if (B[v] == -1) continue;
      B[v]++;
      if (((long double)(edges[v].size() - B[v])) /
              ((long double)edges[v].size()) <
          mid)
        q.push(v), B[v] = -1;
    }
  }
  if (a) sols = possible;
  return !possible.empty();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M >> K;
  A.resize(K);
  edges.resize(N + 1);
  for (int x = 0; x < K; x++) cin >> A[x];
  for (int x = 0; x < M; x++) {
    int u, v;
    cin >> u >> v;
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  long double low = 0, high = 1, mid, ans = -1;
  int cnt = 0;
  while (high - low > 1e-9) {
    mid = (low + high) / 2;
    if (solve(mid)) {
      low = mid;
      ans = max(ans, mid);
    } else {
      high = mid;
    }
    cnt++;
  }
  solve(ans, true);
  cout << sols.size() << '\n';
  for (int v : sols) cout << v << " \n"[v == *sols.rbegin()];
}
