#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
const int INF = (int)1e9 + 1;
const long double EPS = 1e-9;
void precalc() {}
const int maxn = (int)1e5 + 10;
int n, m, k;
int spoiled[maxn];
vector<vector<int> > es;
bool read() {
  if (scanf("%d%d%d", &n, &m, &k) < 3) {
    return 0;
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d", &spoiled[i]);
    --spoiled[i];
  }
  es = vector<vector<int> >(n);
  for (int i = 0; i < m; ++i) {
    int s, t;
    scanf("%d%d", &s, &t);
    --s, --t;
    es[s].push_back(t), es[t].push_back(s);
  }
  return 1;
}
int cnt[maxn];
struct Ratio {
  int a, b;
  Ratio() {}
  Ratio(int _a, int _b) : a(_a), b(_b) {}
  inline bool operator<(const Ratio &r) const {
    return (long long)a * r.b < (long long)b * r.a;
  }
};
long double get(int mask) {
  long double value = 1e18;
  for (int i = 0; i < n; ++i) {
    if (!((mask >> i) & 1)) {
      continue;
    }
    int cur = 0;
    for (int it = 0; it < ((int)(es[i]).size()); ++it) {
      int u = es[i][it];
      if ((mask >> u) & 1) {
        cur += 1;
      }
    }
    value = min(value, (long double)cur / ((int)(es[i]).size()));
  }
  return value;
}
void solve() {
  for (int i = 0; i < n; ++i) {
    cnt[i] = ((int)(es[i]).size());
  }
  for (int i = 0; i < k; ++i) {
    int v = spoiled[i];
    cnt[v] = -1;
    for (int it = 0; it < ((int)(es[v]).size()); ++it) {
      int u = es[v][it];
      if (cnt[u] == -1) {
        continue;
      }
      --cnt[u];
    }
  }
  multiset<pair<Ratio, int> > S;
  for (int i = 0; i < n; ++i) {
    if (cnt[i] >= 0) {
      S.insert(make_pair(Ratio(cnt[i], ((int)(es[i]).size())), i));
    }
  }
  Ratio cur = S.begin()->first;
  int res = k;
  for (int i = k; i < n; ++i) {
    auto iter = S.begin();
    int v = iter->second;
    S.erase(iter);
    cnt[v] = -1;
    for (int it = 0; it < ((int)(es[v]).size()); ++it) {
      int u = es[v][it];
      if (cnt[u] < 0) {
        continue;
      }
      iter = S.find(make_pair(Ratio(cnt[u], ((int)(es[u]).size())), u));
      assert(iter != S.end());
      S.erase(iter);
      cnt[u] -= 1;
      S.insert(make_pair(Ratio(cnt[u], ((int)(es[u]).size())), u));
    }
    spoiled[i] = v;
    if (i < n - 1 && cur < S.begin()->first) {
      cur = S.begin()->first;
      res = i + 1;
    }
  }
  printf("%d\n", n - res);
  for (int i = res; i < n; ++i) {
    printf("%d%c", spoiled[i] + 1, " \n"[i == n - 1]);
  }
  if (n < 15) {
    int maskr = 0;
    for (int i = res; i < n; ++i) {
      maskr ^= (1 << spoiled[i]);
    }
    long double valr = get(maskr);
    assert(fabs(valr - (long double)cur.a / cur.b) < EPS);
    for (int mask = 1; mask < (1 << n); ++mask) {
      bool fail = 0;
      for (int i = 0; i < k; ++i) {
        int v = spoiled[i];
        if ((mask >> v) & 1) {
          fail = 1;
          break;
        }
      }
      if (fail) {
        continue;
      }
      long double value = get(mask);
      assert(value <= valr + EPS);
    }
  }
}
int main() {
  srand(rdtsc());
  precalc();
  while (1) {
    if (!read()) {
      break;
    }
    solve();
  }
  return 0;
}
