#include <bits/stdc++.h>
using namespace std;
vector<int> tpsol;
double tpbst;
vector<int> st;
vector<vector<int> > egs;
vector<int> isok;
vector<int> bnb;
int n;
double lm;
void tkot(int u) {
  if (!isok[u]) return;
  isok[u] = 0;
  int tp;
  for (int i = 0; i < ((int((egs[u]).size()))); ++i) {
    tp = egs[u][i];
    if (!isok[tp]) continue;
    ++bnb[tp];
    if ((int((egs[tp]).size())) * (1 - lm) < bnb[tp]) tkot(tp);
  }
}
bool isp() {
  for (int i = 0; i < (n); ++i) {
    isok[i] = 1;
    bnb[i] = 0;
  }
  for (int i = 0; i < ((int((st).size()))); ++i) tkot(st[i]);
  bool isk = 0;
  for (int i = 0; i < (n); ++i) isk |= isok[i];
  if (!isk) return 0;
  if (lm > tpbst) {
    tpbst = lm;
    tpsol.clear();
    for (int i = 0; i < (n); ++i) {
      if (isok[i]) tpsol.push_back(i + 1);
    }
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int m, k;
  cin >> n >> m >> k;
  isok.resize(n);
  bnb.resize(n);
  egs.resize(n);
  int ta, tb;
  for (int z = 0; z < (k); ++z) {
    cin >> ta;
    st.push_back(ta - 1);
  }
  for (int z = 0; z < (m); ++z) {
    cin >> ta >> tb;
    --ta;
    --tb;
    egs[ta].push_back(tb);
    egs[tb].push_back(ta);
  }
  double mn = -0.01;
  double mx = 1.01;
  double md;
  tpbst = mn;
  for (int z = 0; z < (60); ++z) {
    md = (mx + mn) / 2;
    lm = md;
    if (isp())
      mn = md;
    else
      mx = md;
  }
  cout << (int((tpsol).size())) << endl;
  for (int i = 0; i < ((int((tpsol).size()))); ++i) {
    cout << tpsol[i] << " ";
  }
  cout << endl;
  return 0;
}
