#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int s[211111];
vector<int> v[211111];
double h[211111];
int f[211111];
int q[211111], q1, q2;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < k; i++) scanf("%d", &s[i]), s[i]--;
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--;
    y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  double l = 0;
  double r = 1;
  vector<int> ans;
  for (int it = 0; it < 90; it++) {
    double mid = (l + r) / 2;
    for (int i = 0; i < n; i++) h[i] = 1, f[i] = 0;
    q1 = q2 = 0;
    for (int i = 0; i < k; i++) {
      q[q1++] = s[i];
      f[s[i]] = 1;
    }
    if (ans.size() == 0) {
      for (int i = 0; i < n; i++)
        if (!f[i]) ans.push_back(i);
    }
    while (q1 != q2) {
      int x = q[q2++];
      f[x] = 1;
      for (int i = 0; i < v[x].size(); i++) {
        int to = v[x][i];
        h[to] -= 1. / v[to].size();
        if (h[to] < mid && f[to] == 0) {
          f[to] = 1;
          q[q1++] = to;
        }
      }
    }
    if (q1 == n)
      r = mid;
    else {
      l = mid;
      ans.clear();
      for (int i = 0; i < n; i++)
        if (!f[i]) ans.push_back(i);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    printf("%d", ans[i] + 1);
    if (i + 1 == ans.size())
      puts("");
    else
      putchar(' ');
  }
  return 0;
}
