#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-11;
const int MAXN = 1e5 + 10;
vector<int> g[MAXN];
bool can[MAXN];
int n, m, k;
struct cmp {
  bool operator()(const pair<long double, int>& p1,
                  const pair<long double, int>& p2) {
    if (fabs(p1.first - p2.first) < EPS) {
      return p1.second < p2.second;
    }
    return p1.first < p2.first;
  }
};
set<pair<long double, int>, cmp> S;
long double val[MAXN];
bool in[MAXN];
void turn_on(int v) {
  if (in[v]) {
    return;
  }
  val[v] = 0;
  in[v] = true;
  for (int to : g[v]) {
    if (!in[to]) {
      continue;
    }
    assert(in[to]);
    assert(can[to]);
    assert(to != v);
    S.erase(make_pair(val[to], to));
    val[to] += 1.0 / ((int)(g[to]).size());
    S.insert(make_pair(val[to], to));
    val[v] += 1;
  }
  val[v] /= ((int)(g[v]).size());
  S.insert(make_pair(val[v], v));
}
void turn_off(int v) {
  if (!in[v]) {
    return;
  }
  in[v] = false;
  assert(S.erase(make_pair(val[v], v)));
  for (int to : g[v]) {
    if (!in[to]) {
      continue;
    }
    assert(can[to]);
    assert(to != v);
    S.erase(make_pair(val[to], to));
    val[to] -= 1.0 / ((int)(g[to]).size());
    S.insert(make_pair(val[to], to));
  }
}
int main() {
  memset(can, true, sizeof can);
  cin >> n >> m >> k;
  for (int i = 0; i < (int)k; ++i) {
    int v;
    scanf("%d", &v);
    --v;
    can[v] = false;
  }
  for (int i = 0; i < (int)m; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  long double mx = 0;
  memset(in, false, sizeof in);
  for (int v = 0; v < (int)n; ++v) {
    if (can[v]) {
      turn_on(v);
    }
  }
  for (int it = 0; it < (int)n - k; ++it) {
    assert(!S.empty());
    auto mn = *S.begin();
    int v = mn.second;
    mx = fmax(mx, mn.first);
    assert(in[v]);
    turn_off(v);
  }
  assert(S.empty());
  for (int v = 0; v < (int)n; ++v) {
    if (can[v]) {
      turn_on(v);
    }
  }
  for (int it = 0; it < (int)n - k; ++it) {
    auto mn = *S.begin();
    int v = mn.second;
    if (fabs(mx - mn.first) < EPS) {
      break;
    }
    turn_off(v);
  }
  vector<int> ans;
  for (int v = 0; v < (int)n; ++v)
    if (in[v]) ans.push_back(v);
  printf("%d\n", ((int)(ans).size()));
  for (int v : ans) {
    printf("%d ", v + 1);
  }
  puts("");
  return 0;
}
