#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const double eps = 1e-9;
int n, m, k, siz[MAXN];
int num[MAXN], d[MAXN];
bool vis[MAXN];
vector<int> e[MAXN];
queue<int> q;
bool judge(double mid) {
  memset(vis, false, sizeof(vis));
  memset(d, false, sizeof(d));
  for (int i = 1; i <= k; i++) {
    q.push(num[i]);
    vis[num[i]] = true;
    for (int j = 0; j < siz[num[i]]; j++) {
      d[e[num[i]][j]]++;
    }
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    int len = e[u].size();
    for (int i = 0; i < len; i++) {
      int v = e[u][i];
      if (vis[v]) continue;
      double nu = ((siz[v] - d[v]) * 1.0 / siz[v]);
      if (nu < mid) {
        vis[v] = true;
        for (int j = 0; j < siz[v]; j++) {
          d[e[v][j]]++;
        }
        q.push(v);
      }
    }
  }
  for (int i = 1; i <= n; i++)
    if (!vis[i]) return true;
  return false;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &num[i]);
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) siz[i] = e[i].size();
  double l = 0, r = 1.0;
  while (r - l > eps) {
    double mid = (l + r) / 2;
    if (judge(mid))
      l = mid;
    else
      r = mid;
  }
  memset(vis, false, sizeof(vis));
  judge(l);
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      cnt++;
    }
  }
  cout << cnt << endl;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) printf("%d ", i);
  }
  return 0;
}
