#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e5 + 100, INF = 1e9;
const double eps = 1e-12;
int n, m, k, u[Maxn], v[Maxn];
vector<int> e[Maxn], f, ans;
bool check(long double mid) {
  int i;
  queue<int> q;
  while (!q.empty()) q.pop();
  for (i = 1; i <= n; i++)
    u[i] = (int)e[i].size(), v[i] = ceil(mid * u[i] - eps);
  for (int x : f) u[x] = INF, q.push(x);
  while (!q.empty()) {
    for (int i : e[q.front()])
      if (--u[i] < v[i]) q.push(i), u[i] = INF;
    q.pop();
  }
  ans.clear();
  for (i = 1; i <= n; i++)
    if (u[i] < 1e8) ans.push_back(i);
  return (int)ans.size();
}
int main() {
  ios::sync_with_stdio(0);
  int i, tmp, a, b;
  cin >> n >> m >> k;
  for (i = 1; i <= k; i++) cin >> tmp, f.push_back(tmp);
  for (i = 1; i <= m; i++) cin >> a >> b, e[a].push_back(b), e[b].push_back(a);
  long double l = 0, r = 1, mid;
  while (r - l > eps) {
    if (check(mid = (l + r) / 2))
      l = mid;
    else
      r = mid;
  }
  check(l - eps);
  cout << ans.size() << endl;
  for (int x : ans) cout << x << " ";
  cout << endl;
  return 0;
}
