#include <bits/stdc++.h>
#pragma warning(disable : 4786)
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double PI = acos(-1.0);
const double eps = 1e-10;
const int maxn = 1e5 + 5;
int black[maxn], vis[maxn];
int n, m;
vector<int> G[maxn];
struct Node {
  int x, y;
  double rate;
} node[maxn], temp[maxn];
vector<int> ans;
void dfs(int cur, double x) {
  for (int i = 0; i < G[cur].size(); i++) {
    int nt = G[cur][i];
    if (black[nt] || vis[nt]) continue;
    ++temp[nt].x;
    temp[nt].rate = 1.00 * (temp[nt].y - temp[nt].x) / temp[nt].y;
    if (temp[nt].rate < x && fabs(temp[nt].rate - x) > eps) {
      vis[nt] = 1;
      dfs(nt, x);
    }
  }
}
bool ok(double x) {
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) {
    temp[i] = node[i];
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] || black[i]) continue;
    if (temp[i].rate < x && fabs(temp[i].rate - x) > eps) {
      vis[i] = 1;
      dfs(i, x);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!black[i] && !vis[i]) return true;
  }
  return false;
}
void solve() {
  double left = 0, right = 1;
  for (int i = 0; i < 100; i++) {
    double mid = 0.5 * (left + right);
    if (ok(mid)) {
      ans.clear();
      for (int i = 1; i <= n; ++i) {
        if (!black[i] && !vis[i]) {
          ans.push_back(i);
        }
      }
      left = mid;
    } else {
      right = mid;
    }
  }
}
int main() {
  int k, u, v;
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 0; i < k; i++) {
    scanf("%d", &u);
    black[u] = 1;
  }
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
    ++node[u].y;
    ++node[v].y;
    if (black[v]) ++node[u].x;
    if (black[u]) ++node[v].x;
  }
  for (int i = 1; i <= n; i++) {
    node[i].rate = 1.00 * (node[i].y - node[i].x) / node[i].y;
  }
  solve();
  int sz = ans.size();
  if (sz) {
    printf("%d\n", sz);
    for (int i = 0; i < sz; i++) {
      printf("%d ", ans[i]);
    }
    puts("");
  } else {
    puts("1");
    int ans = -1;
    for (int i = 1; i <= n; i++) {
      if (!black[i]) {
        ans = i;
        break;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
