#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:134217728")
const long long MOD = 1000000007;
const int INF = 1000000000;
const int MAXN = 200000;
const double EPS = 1e-7;
const int HASH_POW = 31;
const double PI = acos(-1.0);
using namespace std;
void my_return(int code) { exit(code); }
bool in[100010];
int iter[100010], bst = 0, timer = 0;
double ans = -0.1;
int cnt[100010];
double d[100010];
vector<int> G[100010];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  mt19937 mt_rand(time(NULL));
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  memset(in, true, sizeof in);
  for (int i = 0; i < k; ++i) {
    int x;
    scanf("%d", &x);
    in[x] = false;
    iter[x] = -1;
  }
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < G[i].size(); ++j) {
      if (in[G[i][j]]) ++cnt[i];
    }
    d[i] = (double)cnt[i] / G[i].size();
  }
  set<pair<double, int> > Q;
  for (int i = 1; i <= n; ++i)
    if (in[i]) Q.insert(make_pair(d[i], i));
  while (!Q.empty()) {
    pair<double, int> tmp = *Q.begin();
    Q.erase(Q.begin());
    if (tmp.first > ans) {
      ans = tmp.first;
      bst = timer;
    }
    int v = tmp.second;
    iter[v] = timer++;
    in[v] = false;
    for (int i = 0; i < G[v].size(); ++i) {
      int to = G[v][i];
      if (in[to]) {
        Q.erase(make_pair(d[to], to));
        --cnt[to];
        d[to] = (double)cnt[to] / G[to].size();
        Q.insert(make_pair(d[to], to));
      }
    }
  }
  int total = 0;
  for (int i = 1; i <= n; ++i)
    if (iter[i] >= bst) ++total;
  printf("%d\n", total);
  for (int i = 1; i <= n; ++i)
    if (iter[i] >= bst) printf("%d ", i);
  my_return(0);
}
