#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 2e9;
const long long LINF = 2e18;
const int N = 1e5 + 20;
vector<int> G[N], fort, ans;
bool visited[N];
int n, m, k, cnt[N];
long double eps = 1e-16;
bool check(long double x) {
  memset(visited, 0, sizeof visited);
  memset(cnt, 0, sizeof cnt);
  ans.clear();
  queue<int> q;
  for (int v : fort) q.push(v), visited[v] = 1;
  while (q.size()) {
    int v = q.front();
    q.pop();
    for (int u : G[v])
      if (!visited[u]) {
        cnt[u]++;
        if (x - ((long double)(G[u].size() - cnt[u]) /
                 (long double)(G[u].size())) >=
            eps)
          q.push(u), visited[u] = 1;
      }
  }
  for (int i = 1; i <= n; i++)
    if (!visited[i]) ans.push_back(i);
  return ans.size();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 0, x; i < k; i++) {
    cin >> x;
    fort.push_back(x);
  }
  for (int i = 0, v, u; i < m; i++) {
    cin >> v >> u;
    G[v].push_back(u);
    G[u].push_back(v);
  }
  long double l = 0, r = 1;
  while (r - l > 1e-9) {
    long double mid = (r + l) / 2;
    (check(mid) ? l : r) = mid;
  }
  check(l);
  cout << ans.size() << endl;
  for (int v : ans) cout << v << ' ';
  cout << endl;
}
