#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const int MOD = 1000000007;
const int N = 100009;
bool kr[N + 1];
vector<int> g[N + 1];
int cnt[N + 1];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = (1); i <= (k); ++i) {
    int v;
    scanf("%d", &v);
    kr[v] = true;
  }
  for (int i = (1); i <= (m); ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  memset(cnt, 0, sizeof(cnt));
  for (int i = (1); i <= (n); ++i) {
    for (int j = (0); j <= ((int)((g[i]).size()) - 1); ++j) {
      if (!kr[g[i][j]]) ++cnt[i];
    }
  }
  double best = -1;
  int who = -1;
  set<pair<double, int> > q;
  for (int i = (1); i <= (n); ++i)
    if (!kr[i]) q.insert(make_pair(cnt[i] / double((int)((g[i]).size())), i));
  while (!q.empty()) {
    pair<double, int> cur = *q.begin();
    q.erase(q.begin());
    if (cur.first > best) {
      best = cur.first;
      who = cur.second;
    }
    int v = cur.second;
    for (int i = (0); i <= ((int)((g[v]).size()) - 1); ++i) {
      int to = g[v][i];
      if (!q.count(make_pair(cnt[to] / double((int)((g[to]).size())), to)))
        continue;
      q.erase(make_pair(cnt[to] / double((int)((g[to]).size())), to));
      cnt[to]--;
      q.insert(make_pair(cnt[to] / double((int)((g[to]).size())), to));
    }
  }
  memset(cnt, 0, sizeof(cnt));
  for (int i = (1); i <= (n); ++i) {
    for (int j = (0); j <= ((int)((g[i]).size()) - 1); ++j) {
      if (!kr[g[i][j]]) ++cnt[i];
    }
  }
  q.clear();
  for (int i = (1); i <= (n); ++i)
    if (!kr[i]) q.insert(make_pair(cnt[i] / double((int)((g[i]).size())), i));
  while (!q.empty()) {
    pair<double, int> cur = *q.begin();
    if (cur.second == who) {
      vector<int> ans;
      for (set<pair<double, int> >::iterator it = q.begin(); it != q.end();
           ++it)
        ans.push_back(it->second);
      cout << (int)((ans).size()) << endl;
      for (int i = (0); i <= ((int)((ans).size()) - 1); ++i)
        printf("%d ", ans[i]);
      cout << endl;
      exit(0);
    }
    q.erase(q.begin());
    int v = cur.second;
    for (int i = (0); i <= ((int)((g[v]).size()) - 1); ++i) {
      int to = g[v][i];
      if (!q.count(make_pair(cnt[to] / double((int)((g[to]).size())), to)))
        continue;
      q.erase(make_pair(cnt[to] / double((int)((g[to]).size())), to));
      cnt[to]--;
      q.insert(make_pair(cnt[to] / double((int)((g[to]).size())), to));
    }
  }
}
