#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long int
#define ordered_set tree < ll ,  null_type ,  less<ll> ,  rb_tree_tag ,  tree_order_statistics_node_update >
//added two more functions to set
//(1)*(set.find_by_order(k))[kth element in the sorted set]
//(2)set.order_of_key(k)[count of elements strictly less than k]
typedef vector< int > vi;
typedef vector< ll > lvi;
typedef vector< vi > vvi;
typedef vector< lvi > lvvi;
typedef pair< int,int > ii;
typedef pair< ll,ll > lii;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)//remember i is an iterator
#define present(c,x) ((c).find(x) != (c).end())//for sets,maps,multimaps
#define cpresent(c,x) (find(all(c),x) != (c).end())//for vectors
#define tc(t) int (t); cin>>(t);while((t)--)
#define ff first
#define ss second
#define mp make_pair
#define ld long double
#define ull unsigned long long int
#define mod 1000000007
vvi adj;
vi mark,flaw;
ll n,m,k;
ld d[200000];
ld pr=0.0000000001;
bool visited[200000];
void dks()
{
	priority_queue<pair<ld,int>,vector<pair<ld,int>>,greater<pair<ld,int>>> pq;
	for(int i=1;i<=n;i++)
	{
		if(!mark[i])
		{
			if(adj[i].size()==0)
			{
				mark[i]=1;
				continue;
				// cout<<"1\n";
				// cout<<i<<endl;
				// return ;
			}
			ld val=((ld)(adj[i].size()-flaw[i])/(ld)adj[i].size());
			pq.push({val,i});
			d[i]=val;
		}
	}
	ll ans=-1;
	vi v1;
	// cout<<"YES\n";
	while(!pq.empty())
	{
		ld val=pq.top().ff;
		int idx=pq.top().ss;
		pq.pop();
		if(val-d[idx]>pr) continue;
		visited[idx]=true;
		// cout<<val<<"  "<<idx<<endl;
		if(val>ans)
		{
			ans=val;
			v1.clear();
		}
		v1.pb(idx);
		for(auto next:adj[idx])
		{
			if(mark[next]) continue;
			if(visited[next]) continue;
			ld val1=d[next]-((ld)1/(ld)adj[next].size());
			d[next]=val1;
			pq.push({val1,next});
		}
	}
	// cout<<"YES\n";
	cout<<v1.size()<<endl;
	for(int i=0;i<(int)v1.size();i++)
	{
		cout<<v1[i]<<" ";
	}
	cout<<endl;
}
int main()
{
	// ios_base::sync_with_stdio(false);
 //    cin.tie(NULL);
	cin>>n>>m>>k;
	// cout<<"YES\n";
	adj.resize(n+2);
	mark.resize(n+2);
	flaw.resize(n+2,0);
	for(int i=0;i<k;i++)
	{
		int x;
		cin>>x;
		mark[x]=1;
	}
	// cout<<"YES\n";
	for(int i=0;i<m;i++)
	{
		int x,y;
		cin>>x>>y;
		adj[x].pb(y);
		adj[y].pb(x);
	}
	// cout<<"YES\n";
	for(int i=1;i<=n;i++)
	{
		if(mark[i])
		{
			for(auto next:adj[i])
			{
				if(!mark[next])
				flaw[next]++;
			}
		}
	}
	// cout<<"YES\n";
	dks();
	// cout<<"YES1\n";
	return 0;
}


#include <bits/stdc++.h>

typedef long long LL;
const int N = 100005;

int n, m, k, deg[N], now[N];
bool banned[N], removed[N];
std::vector<int> g[N];

struct cmp {
	bool operator () (int x, int y) {
		LL tmp = (LL) now[x] * deg[y] - (LL) now[y] * deg[x];
		return tmp ? tmp < 0 : x < y;
	}
};
std::set<int, cmp> s;

int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> n >> m >> k;
	for (int i = 1, x; i <= k; ++i)
		std::cin >> x, banned[x] = 1;
	for (int i = 1, x, y; i <= m; ++i) {
		std::cin >> x >> y, ++deg[x], ++deg[y];
		if (banned[x] || banned[y]) continue;
		g[x].emplace_back(y);
		g[y].emplace_back(x);
	}
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) now[i] = g[i].size();
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) s.insert(i);
	int a = -1, b = 1, id = 0;
	while (s.size()) {
		int t = *s.begin(); s.erase(t), removed[t] = 1;
		if ((LL) a * deg[t] < (LL) now[t] * b)
			a = now[t], b = deg[t], id = t;
		for (int p : g[t]) if (!removed[p]) s.erase(p);
		for (int p : g[t]) if (!removed[p]) --now[p];
		for (int p : g[t]) if (!removed[p]) s.insert(p);
	}
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) now[i] = g[i].size();
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) s.insert(i), removed[i] = 0;
	while (s.size()) {
		int t = *s.begin(); removed[t] = 1;
		if (t == id) {
			std::cout << s.size() << '\n';
			for (int p : s)
				std::cout << p << ' ';
			std::cout << '\n';
			return 0;
		}
		s.erase(t);
		for (int p : g[t]) if (!removed[p]) s.erase(p);
		for (int p : g[t]) if (!removed[p]) --now[p];
		for (int p : g[t]) if (!removed[p]) s.insert(p);
	}
	return 0;
}


#include <bits/stdc++.h>

typedef long long LL;
const int N = 100005;

int n, m, k, deg[N], now[N];
bool banned[N], removed[N];
std::vector<int> g[N];

struct cmp {
	bool operator () (int x, int y) {
		LL tmp = (LL) now[x] * deg[y] - (LL) now[y] * deg[x];
		return tmp ? tmp < 0 : x < y;
	}
};
std::set<int, cmp> s;

int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> n >> m >> k;
	for (int i = 1, x; i <= k; ++i)
		std::cin >> x, banned[x] = 1;
	for (int i = 1, x, y; i <= m; ++i) {
		std::cin >> x >> y, ++deg[x], ++deg[y];
		if (banned[x] || banned[y]) continue;
		g[x].emplace_back(y);
		g[y].emplace_back(x);
	}
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) now[i] = g[i].size();
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) s.insert(i);
	int a = -1, b = 1, id = 0;
	while (s.size()) {
		int t = *s.begin(); s.erase(t), removed[t] = 1;
		if ((LL) a * deg[t] < (LL) b * now[t])
			a = now[t], b = deg[t], id = t;
		for (int p : g[t]) if (!removed[p]) s.erase(p);
		for (int p : g[t]) --now[p];
		for (int p : g[t]) if (!removed[p]) s.insert(p);
	}
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) now[i] = g[i].size();
	for (int i = 1; i <= n; ++i)
		if (!banned[i]) s.insert(i);
	while (s.size()) {
		int t = *s.begin(); removed[t] = 1;
		if (t == id) {
			std::cout << s.size() << '\n';
			for (int p : s)
				std::cout << p << ' ';
			std::cout << '\n';
			return 0;
		}
		s.erase(t);
		for (int p : g[t]) if (!removed[p]) s.erase(p);
		for (int p : g[t]) --now[p];
		for (int p : g[t]) if (!removed[p]) s.insert(p);
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
#define endl "\n"
#define LL long long int
#define vi vector<int>
#define vl vector<LL>
#define all(V) V.begin(),V.end()
#define scs(s) scanf("%s",s)
#define pii pair<int,int>
#define pll pair<LL,LL>
#ifndef ONLINE_JUDGE
#define cout cerr
#endif
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}
#define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
#define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
#define debug(x)  cerr << #x << " = " << x << endl
function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
template <typename T> vector<T>& operator << (vector<T> &__container, T x){ __container.push_back(x); return __container; }
template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; return out; }
void sci(){}
template<typename... Args> void sci(int &x, Args&... args){ scanf("%d",&x); sci(args...); }
void scl(){}
template<typename... Args> void scl(LL &x, Args&... args){ scanf("%lld",&x); scl(args...); }
const double eps = 1e-8;
const int MAXN = 2e5+7;
int n, m, k, neib[MAXN];
bool vis[MAXN];
vector<int> fortress, G[MAXN];
bool check(double rate){
    for(int i = 1; i <= n; i++) neib[i] = G[i].size() - (int)ceil(G[i].size() * rate);
    memset(vis,0,sizeof(vis));
    queue<int> que;
    for(int x : fortress){
        vis[x] = true;
        que.push(x);
    }
    while(!que.empty()){
        int u = que.front(); que.pop();
        for(int v : G[u]){
            if(vis[v]) continue;
            if(--neib[v]<0){
                vis[v] = true;
                que.push(v);
            }
        }
    }
    for(int i = 1; i <= n; i++) if(!vis[i]) return true;
    return false;
}
void solve(){
    // cout << fixed << setprecision(10) << 49899./49999. << endl <<  24949./24999. << endl; // delta < 1e-7
    sci(n,m,k);
    fortress.resize(k);
    for(int &x : fortress) sci(x);
    for(int i = 1; i <= m; i++){
        int u, v; sci(u,v);
        G[u] << v; G[v] << u;
    }
    double l = 0, r = 1;
    while(r-l>=eps){
        double mid = (l + r) / 2;
        if(check(mid)) l = mid;
        else r = mid;
    }
    check(l);
    vector<int> vec;
    for(int i = 1; i <= n; i++) if(!vis[i]) vec << i;
    cout << vec.size() << endl;
    for(int &x : vec) cout << x << ' '; cout << endl;
}
int main(){
    #ifndef ONLINE_JUDGE
    freopen("Local.in","r",stdin);
    freopen("ans.out","w",stdout);
    #endif
    solve();
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define f1 first
#define f2 second
#define int long long
#define int1 int
#define pb push_back
#define pii pair<int ,int >
using namespace std;
set<pair<long double ,int> > s;
long double ha[100009];
vector <int> z;
vector <int> v[100009];
bool visit[100009];
main()
{
   int n,m,k;
   cin>>n>>m>>k;
   for(int i=1 ; i<=n ; i++)
    ha[i]=1;
   for(int i=0 ; i<k ; i++)
   {
       int a;
       cin>>a;
       z.pb(a);
       visit[a]=1;
   }
   for(int i=0 ; i<m ; i++)
   {
       int a,b;
       cin>>a>>b;
       v[a].pb(b);
       v[b].pb(a);
   }
   for(int i:z)
   {
       for(int j:v[i])
       {   if(visit[j]==0)
           {long double x=v[j].size();
            long double l=(1/x);
           ha[j]-=l;}
       }
   }
   for(int i=1 ; i<=n ; i++)
   {
       if(visit[i]==0)
       {
           s.insert(mp(ha[i],i));
       }
   }
   long double o=0;
   for(int i=0 ; i<n-k ; i++)
   {
    long double x=s.begin()->f1;
    int y=s.begin()->f2;
    o=max(o,x);
    s.erase(s.begin());
    visit[y]=1;
    for(int j:v[y])
    {   if(visit[j]==0)
        {
            long double x=v[j].size();
              s.erase(mp(ha[j],j));
              long double l=(1/x);
             ha[j]-=l;
             s.insert(mp(ha[j],j));
        }
    }
   }

   long double p=0;
   for(int i=0 ; i<n ; i++)
   {
       visit[i+1]=0;
       ha[i+1]=1;
   }
   for(int i:z)
   {
       visit[i]=1;
   }
   for(int i:z)
   {
       for(int j:v[i])
       {   if(visit[j]==0)
           {long double x=v[j].size();
            long double l=(1/x);
           ha[j]-=l;}
       }
   }
      for(int i=1 ; i<=n ; i++)
   {
       if(visit[i]==0)
       {
           s.insert(mp(ha[i],i));
       }
   }
     for(int i=0 ; i<n-k ; i++)
   {
    long double x=s.begin()->f1;
    int y=s.begin()->f2;
    p=max(p,x);
    s.erase(s.begin());

    if(p==o)
    {   int w=0;
        for(int i=1 ; i<=n ; i++)
        {
            if(visit[i]==0)
                w+=1;
        }
        cout<<w<<'\n';
             for(int i=1 ; i<=n ; i++)
        {
            if(visit[i]==0)
                cout<<i<<" ";
        }
        exit(0);
    }
    visit[y]=1;
    for(int j:v[y])
    {   if(visit[j]==0)
        {
             long double x=v[j].size();
              s.erase(mp(ha[j],j));
              long double l=(1/x);
             ha[j]-=l;
             s.insert(mp(ha[j],j));
        }
    }
   }

}


#include<bits/stdc++.h>
#define all(x) begin(x), end(x)
using ll = long long;
using namespace std;
const int maxn = 1<<17, mod = 1e9 + 7;
int n, m, k;
struct fr {
	ll x, y;
	fr(ll x = 0, ll y = 1) : x(x), y(y) {}
	friend bool operator<(const fr& a, const fr&b) {
		return a.x*b.y < b.x*a.y;
	}
};
set<pair<fr, int>> a;
int deg[maxn], rm[maxn], bad[maxn];
vector<int> g[maxn];
void add(int v) {
	rm[v] = 0;
	for(auto &i : g[v]) if(!rm[i]) {
		a.erase({fr(deg[i], g[i].size()), i});
		a.insert({fr(++deg[i], g[i].size()), i});
		deg[v]++;
	}
	a.insert({fr(deg[v], g[v].size()), v});
}
void rem(int v) {
	rm[v] = 1;
	a.erase({fr(deg[v], g[v].size()), v});
	for(auto &i : g[v]) if(!rm[i]) {
		a.erase({fr(deg[i], g[i].size()), i});
		a.insert({fr(--deg[i], g[i].size()), i});
		deg[v]--;
	}
}
signed main() {
	cin.tie(0)->sync_with_stdio(0);
	cin >> n >> m >> k;
	for(int t, i = 0; i < k; i++) cin >> t, bad[t] = 1;
	for(int f, t, i = 0; i < m; i++) {
		cin >> f >> t;
		g[f].push_back(t);
		g[t].push_back(f);
	}
	memset(rm, 1, sizeof rm);
	for(int i = 1; i <= n; i++) if(!bad[i]) add(i);
	pair<fr, int> ans = {fr(0, 1), 0};
	int oa = a.size();
	for(int i = 0; i <= oa; i++) {
		ans = max(ans, {a.empty()?0:a.begin()->first, i});
		if(!a.empty()) {
			rem(a.begin()->second);
		}
	}
	for(int i = 1; i <= n; i++) if(!bad[i]) add(i);
	for(int i = 0; i < ans.second; i++) {
		rem(a.begin()->second);
	}
	cerr << ans.first.x << " " << ans.first.y << endl;
	vector<int> rs;
	for(int i = 1; i <= n; i++) if(!rm[i]) rs.push_back(i);
	cout << rs.size() << endl;
	for(auto &i : rs) cout << i << " "; cout << endl;
}


#include<bits/stdc++.h>
#define all(x) begin(x), end(x)
using ll = long long;
using namespace std;
const int maxn = 1<<17, mod = 1e9 + 7;
int n, m, k;
struct fr {
	ll x, y;
	fr(ll x = 0, ll y = 1) : x(x), y(y) {}
	friend bool operator<(const fr& a, const fr&b) {
		return a.x*b.y < b.x*a.y;
	}
};
set<pair<fr, int>> a;
int deg[maxn], rm[maxn], bad[maxn];
vector<int> g[maxn];
void add(int v) {
	rm[v] = 0;
	for(auto &i : g[v]) if(!rm[i]) {
		a.erase({fr(deg[i], g[i].size()), i});
		a.insert({fr(++deg[i], g[i].size()), i});
		deg[v]++;
	}
	a.insert({fr(deg[v], g[v].size()), v});
}
void rem(int v) {
	rm[v] = 1;
	a.erase({fr(deg[v], g[v].size()), v});
	for(auto &i : g[v]) if(!rm[i]) {
		a.erase({fr(deg[i], g[i].size()), i});
		a.insert({fr(--deg[i], g[i].size()), i});
		deg[v]--;
	}
}
signed main() {
	cin.tie(0)->sync_with_stdio(0);
	cin >> n >> m >> k;
	for(int t, i = 0; i < k; i++) cin >> t, bad[t] = 1;
	for(int f, t, i = 0; i < m; i++) {
		cin >> f >> t;
		g[f].push_back(t);
		g[t].push_back(f);
	}
	memset(rm, 1, sizeof rm);
	for(int i = 1; i <= n; i++) if(!bad[i]) add(i);
	pair<fr, int> ans = {fr(0, 1), 0};
	int oa = a.size();
	for(int i = 0; i <= oa; i++) {
		ans = max(ans, {a.empty()?0:a.begin()->first, -i});
		if(!a.empty()) {
			rem(a.begin()->second);
		}
	}
	for(int i = 1; i <= n; i++) if(!bad[i]) add(i);
	for(int i = 0; i < -ans.second; i++) {
		rem(a.begin()->second);
	}
	cerr << ans.first.x << " " << ans.first.y << endl;
	vector<int> rs;
	for(int i = 1; i <= n; i++) if(!rm[i]) rs.push_back(i);
	cout << rs.size() << endl;
	for(auto &i : rs) cout << i << " "; cout << endl;
}


#include <bits/stdc++.h>
using namespace std;
bool nok[100005];
int nom[100005],deg[100005],delt[100005];
vector<int> v[100005];
struct frac
{
	int a,b;
	frac(int a,int b):a(a),b(b){}
	bool operator<(const frac &f) const
	{
		return 1LL*a*f.b<1LL*b*f.a;
	}
};
int main()
{
	int n,m,k;
	scanf("%d%d%d",&n,&m,&k);
	while (k--)
	{
		int a;
		scanf("%d",&a);
		nok[a]=1;
	}
	while (m--)
	{
		int a,b;
		scanf("%d%d",&a,&b);
		deg[a]++;
		deg[b]++;
		if (nok[a] || nok[b])
		continue;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	set<pair<frac,int> > s;
	for (int i=1;i<=n;i++)
	{
		if (!nok[i])
		{
			nom[i]=v[i].size();
			s.insert({frac(nom[i],deg[i]),i});
		}
	}
	pair<frac,int> ans(frac(0,1),0);
	int ct=1;
	while (!s.empty())
	{
		auto p=*s.begin();
		s.erase(s.begin());
		nom[p.second]=-1;
		ans=max(ans,make_pair(p.first,ct));
		delt[p.second]=ct++;
		for (int u:v[p.second])
		{
			if (nom[u]!=-1)
			{
				s.erase({frac(nom[u],deg[u]),u});
				nom[u]--;
				s.insert({frac(nom[u],deg[u]),u});
			}
		}
	}
	printf("%d\n",ct-ans.second);
	for (int i=1;i<=n;i++)
	{
		if (delt[i]>=ans.second)
		printf("%d ",i);
	}
}


// Ala be zekrellah tatmaenolgholoob ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define F first
#define S second
#define MP make_pair
const int maxn = 1e5+9;
const ll mod = 1e9+7;

vector <int> g[maxn];
set <pair<ld,int>> st;
int n, m, k, num[maxn], curnum[maxn];
bool bad[maxn], vis[maxn];

bool cal (ld mid) {
	st.clear();
	memset(vis, 0, sizeof vis);
	for (int i = 0; i < n; i++)
		if (!bad[i]) {
			curnum[i] = num[i];
			st.insert(MP((double) curnum[i] / g[i].size(), i));
		}
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val >= mid)
			break;
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) curnum[u] / g[u].size(), u));
			curnum[u]--;
			st.insert(MP((double) curnum[u] / g[u].size(), u));
		}
	}
	return st.size();
}

int main () {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++) {
		int x;
		cin >> x;
		--x;
		bad[x] = true;
	}
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		--v; --u;
		g[v].push_back(u); g[u].push_back(v);
		if (!bad[v])
			num[u]++;
		if (!bad[u])
			num[v]++;
	}
	ld l = 0, r = 1, mid;
	for (int i = 0; i < 200; i++) {
		mid = (l + r) / 2;
		if (cal(mid))
			l = mid;
		else
			r = mid;
	}
	cal(mid);
	cout << st.size() << "\n";
	for (auto x : st)
		cout << x.S + 1 << " ";
	cout << "\n";
}


// Ala be zekrellah tatmaenolgholoob ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define F first
#define S second
#define MP make_pair
const int maxn = 1e5+9;
const ll mod = 1e9+7;

vector <int> g[maxn];
set <pair<ld,int>> st;
int n, m, k, num[maxn], curnum[maxn];
bool bad[maxn], vis[maxn];

bool cal (ld mid) {
	st.clear();
	memset(vis, 0, sizeof vis);
	for (int i = 0; i < n; i++)
		if (!bad[i]) {
			curnum[i] = num[i];
			st.insert(MP((double) curnum[i] / g[i].size(), i));
		}
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val >= mid)
			break;
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) curnum[u] / g[u].size(), u));
			curnum[u]--;
			st.insert(MP((double) curnum[u] / g[u].size(), u));
		}
	}
	return st.size();
}

int main () {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++) {
		int x;
		cin >> x;
		--x;
		bad[x] = true;
	}
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		--v; --u;
		g[v].push_back(u); g[u].push_back(v);
		if (!bad[v])
			num[u]++;
		if (!bad[u])
			num[v]++;
	}
	ld l = 0, r = 1, mid;
	for (int i = 0; i < 200; i++) {
		mid = (l + r) / 2;
		if (cal(mid))
			l = mid;
		else
			r = mid;
	}
	cal(l);
	cout << st.size() << "\n";
	for (auto x : st)
		cout << x.S + 1 << " ";
	cout << "\n";
}


// Ala be zekrellah tatmaenolgholoob ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define F first
#define S second
#define MP make_pair
const int maxn = 1e5+9;
const ll mod = 1e9+7;

vector <int> g[maxn];
set <pair<ld,int>> st;
int n, m, k, num[maxn], curnum[maxn];
bool bad[maxn], vis[maxn];

bool cal (ld mid) {
	st.clear();
	memset(vis, 0, sizeof vis);
	for (int i = 0; i < n; i++)
		if (!bad[i]) {
			curnum[i] = num[i];
			st.insert(MP((double) curnum[i] / g[i].size(), i));
		}
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val >= mid)
			break;
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) curnum[u] / g[u].size(), u));
			curnum[u]--;
			st.insert(MP((double) curnum[u] / g[u].size(), u));
		}
	}
	return st.size();
}

int main () {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++) {
		int x;
		cin >> x;
		--x;
		bad[x] = true;
	}
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		--v; --u;
		g[v].push_back(u); g[u].push_back(v);
		if (!bad[v])
			num[u]++;
		if (!bad[u])
			num[v]++;
	}
	ld l = 0, r = 1, mid;
	for (int i = 0; i < 20; i++) {
		mid = (l + r) / 2;
		if (cal(mid))
			l = mid;
		else
			r = mid;
	}
	cal(l);
	cout << st.size() << "\n";
	for (auto x : st)
		cout << x.S + 1 << " ";
	cout << "\n";
}


// Ala be zekrellah tatmaenolgholoob ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define F first
#define S second
#define MP make_pair
const int maxn = 1e5+9;
const ll mod = 1e9+7;

vector <int> g[maxn];
set <pair<ld,int>> st;
int n, m, k, num[maxn], curnum[maxn];
bool bad[maxn], vis[maxn];

bool cal (ld mid) {
	st.clear();
	memset(vis, 0, sizeof vis);
	for (int i = 0; i < n; i++)
		if (!bad[i]) {
			curnum[i] = num[i];
			st.insert(MP((double) curnum[i] / g[i].size(), i));
		}
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val >= mid)
			break;
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) curnum[u] / g[u].size(), u));
			curnum[u]--;
			st.insert(MP((double) curnum[u] / g[u].size(), u));
		}
	}
	return st.size();
}

int main () {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++) {
		int x;
		cin >> x;
		--x;
		bad[x] = true;
	}
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		--v; --u;
		g[v].push_back(u); g[u].push_back(v);
		if (!bad[v])
			num[u]++;
		if (!bad[u])
			num[v]++;
	}
	ld l = 0, r = 1, mid;
	for (int i = 0; i < 30; i++) {
		mid = (l + r) / 2;
		if (cal(mid))
			l = mid;
		else
			r = mid;
	}
	cal(l);
	cout << st.size() << "\n";
	for (auto x : st)
		cout << x.S + 1 << " ";
	cout << "\n";
}


// Ala be zekrellah tatmaenolgholoob ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define F first
#define S second
#define MP make_pair
const int maxn = 1e5+9;
const ll mod = 1e9+7;

vector <int> g[maxn];
set <pair<ld,int>> st;
int n, m, k, num[maxn], curnum[maxn];
bool bad[maxn], vis[maxn];

bool cal (ld mid) {
	st.clear();
	memset(vis, 0, sizeof vis);
	for (int i = 0; i < n; i++)
		if (!bad[i]) {
			curnum[i] = num[i];
			st.insert(MP((double) curnum[i] / g[i].size(), i));
		}
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val >= mid)
			break;
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) curnum[u] / g[u].size(), u));
			curnum[u]--;
			st.insert(MP((double) curnum[u] / g[u].size(), u));
		}
	}
	return st.size();
}

int main () {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++) {
		int x;
		cin >> x;
		--x;
		bad[x] = true;
	}
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		--v; --u;
		g[v].push_back(u); g[u].push_back(v);
		if (!bad[v])
			num[u]++;
		if (!bad[u])
			num[v]++;
	}
	ld l = 0, r = 1, mid;
	for (int i = 0; i < 50; i++) {
		mid = (l + r) / 2;
		if (cal(mid))
			l = mid;
		else
			r = mid;
	}
	cal(l);
	cout << st.size() << "\n";
	for (auto x : st)
		cout << x.S + 1 << " ";
	cout << "\n";
}


// Ala be zekrellah tatmaenolgholoob ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define F first
#define S second
#define MP make_pair
const int maxn = 1e5+9;
const ll mod = 1e9+7;

vector <int> g[maxn];
set <pair<ld,int>> st;
int n, m, k, num[maxn];
bool bad[maxn], vis[maxn];

int main () {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++) {
		int x;
		cin >> x;
		--x;
		bad[x] = true;
	}
	for (int i = 0; i < m; i++) {
		int v, u;
		cin >> v >> u;
		--v; --u;
		g[v].push_back(u); g[u].push_back(v);
		if (!bad[v])
			num[u]++;
		if (!bad[u])
			num[v]++;
	}
	for (int i = 0; i < n; i++)
		if (!bad[i])
			st.insert(MP((double) num[i] / g[i].size(), i));
	ld mxval = -1;
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val > mxval)
			mxval = val;
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) num[u] / g[u].size(), u));
			num[u]--;
			st.insert(MP((double) num[u] / g[u].size(), u));
		}
	}
	memset(vis, 0, sizeof vis);
	memset(num, 0, sizeof num);
	for (int i = 0; i < n; i++)
		for (auto u : g[i])
			if (!bad[u])
				num[i]++;
	for (int i = 0; i < n; i++)
		if (!bad[i])
			st.insert(MP((double) num[i] / g[i].size(), i));
	while (st.size()) {
		ld val = (*st.begin()).F;
		int id = (*st.begin()).S;
		vis[id] = true;
		if (val == mxval) {
			cout << st.size() << "\n";
			for (auto x : st)
				cout << x.S + 1 << " "; cout << "\n";
			return 0;
		}
		st.erase(*st.begin());
		for (auto u : g[id]) {
			if (bad[u] || vis[u])
				continue;
			st.erase(MP((double) num[u] / g[u].size(), u));
			num[u]--;
			st.insert(MP((double) num[u] / g[u].size(), u));
		}
	}

}


#include <bits/stdc++.h>

using namespace std;

#define int ll
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pi> vp;
typedef vector<pl> vpl;

vi e[100010];

struct st{
	int x;
	int n;
	int r;

	bool operator< (const st& a) const{
		double d = r * 1.0 / (n * 1.0), ad = a.r * 1.0 / (a.n * 1.0);
		if (d != ad) return d < ad;
		if (r != a.r) return r < a.r;
		if (n != a.n) return n < a.n;
		return x < a.x;
	}
};

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	cerr.tie(nullptr);

	int n, m, k;
	cin >> n >> m >> k;

	vi vis(n + 1, 0);
	for (int i = 0; i < k; ++i){
		int x;
		cin >> x;
		vis[x] = 1;
	}

	for (int i = 0; i < m; ++i){
		int u, v;
		cin >> u >> v;

		e[u].push_back(v);
		e[v].push_back(u);
	}

	set<st> s;
	vi p(n + 1, 0);
	for (int i = 1; i <= n; ++i){
		if (vis[i]) continue;

		int cnt = 0;
		for (auto& j : e[i]){
			cnt += (!vis[j]);
		}

		p[i] = cnt;
		st t = {i, e[i].size(), cnt};
		s.insert(t);
	}

	double r = 0;
	vi sl = {}, res = {};

	while(!s.empty()){
		auto t = *s.begin();
		s.erase(s.begin());

		double y = t.r * 1.0 / (t.n * 1.0);
		if (r < y){
			sl = res;
			r = y;
		}
		res.push_back(t.x);

		for (auto& i : e[t.x]){
			st tmp = {i, e[i].size(), p[i]};
			if (!s.count(tmp)) continue;
			--p[i];
			s.erase(tmp);
			tmp.r = p[i];
			s.insert(tmp);
		}
	}

	set<int> q;
	for (auto& i : sl)
		q.insert(i);

	vi sol;
	for (int i = 1; i <= n; ++i){
		if (!q.count(i) && !vis[i])
			sol.push_back(i);
	}

	cout << (int)sol.size() << '\n';
	for (auto& i : sol)
		cout << i << ' ';
	cout << '\n';
}


#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
const int N=1e5+5;
int n,m,k,x,B,D[N],Ko;
double res,ans;
set < pair < double , int > > st;
vector < int > v[N];
bool f[N],fix[N];
main () {
	scanf("%d%d%d",&n,&m,&k);

	for (int i=1; i<=k; i++) {
		int x;
		scanf("%d",&x);
		f[x]=1;
	}

	for (int i=1; i<=m; i++) {
		int a,b;
		scanf("%d%d",&a,&b);
		v[a].push_back(b);
		v[b].push_back(a);
	}

	for (int i=1; i<=n; i++) {
		if (f[i]) continue;
		B=v[i].size();
		for (int j=0; j<v[i].size(); j++)
			if (!f[v[i][j]]) D[i]++;
		st.insert({D[i]*1.0/B*1.0,i});
	}

	while (st.size()) {
		res=(*st.begin()).F;
		x=(*st.begin()).S;
		st.erase(st.find(*st.begin()));
		if (ans<res) ans=res,Ko=x;
		fix[x]=1;
		for (int i=0; i<v[x].size(); i++) {
			int to=v[x][i],sz=v[to].size();
			if (!fix[to] && !f[to]) {
				st.erase(st.find({D[to]*1.0/sz*1.0,to}));
				D[to]--;
				st.insert({D[to]*1.0/sz*1.0,to});
			}
		}
	}

	for (int i=1; i<=n; i++) {
		fix[i]=0,D[i]=0;
		if (f[i]) continue;
		B=v[i].size();
		for (int j=0; j<v[i].size(); j++)
			if (!f[v[i][j]]) D[i]++;
		st.insert({D[i]*1.0/B*1.0,i});
	}

	while (st.size()) {
		res=(*st.begin()).F;
		x=(*st.begin()).S;
		if (Ko==x) break;
		st.erase(st.find(*st.begin()));
 		fix[x]=1;
		for (int i=0; i<v[x].size(); i++) {
			int to=v[x][i],sz=v[to].size();
			if (!fix[to] && !f[to]) {
				st.erase(st.find({D[to]*1.0/sz*1.0,to}));
				D[to]--;
				st.insert({D[to]*1.0/sz*1.0,to});
			}
		}
	}

	cout<<st.size()<<" \n";

	for (set < pair < double , int > > :: iterator it=st.begin(); it!=st.end(); it++)
		cout<<(*it).S<<" ";
}


#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
const int N=1e5+5;
int n,m,k,x,B,D[N],Ko;
double res,ans;
set < pair < double , int > > st;
vector < int > v[N];
bool f[N],fix[N];
main () {
	scanf("%d%d%d",&n,&m,&k);

	for (int i=1; i<=k; i++) {
		int x;
		scanf("%d",&x);
		f[x]=1;
	}

	for (int i=1; i<=m; i++) {
		int a,b;
		scanf("%d%d",&a,&b);
		v[a].push_back(b);
		v[b].push_back(a);
	}

	for (int i=1; i<=n; i++) {
		if (f[i]) continue;
		B=v[i].size();
		for (int j=0; j<v[i].size(); j++)
			if (!f[v[i][j]]) D[i]++;
		st.insert({D[i]*1.0/B*1.0,i});
	}

	while (st.size()) {
		res=(*st.begin()).F;
		x=(*st.begin()).S;
		st.erase(st.find(*st.begin()));
		if (ans<=res) ans=res,Ko=x;
		fix[x]=1;
		for (int i=0; i<v[x].size(); i++) {
			int to=v[x][i],sz=v[to].size();
			if (!fix[to] && !f[to]) {
				st.erase(st.find({D[to]*1.0/sz*1.0,to}));
				D[to]--;
				st.insert({D[to]*1.0/sz*1.0,to});
			}
		}
	}

	for (int i=1; i<=n; i++) {
		fix[i]=0,D[i]=0;
		if (f[i]) continue;
		B=v[i].size();
		for (int j=0; j<v[i].size(); j++)
			if (!f[v[i][j]]) D[i]++;
		st.insert({D[i]*1.0/B*1.0,i});
	}

	while (st.size()) {
		res=(*st.begin()).F;
		x=(*st.begin()).S;
		if (Ko==x) break;
		st.erase(st.find(*st.begin()));
 		fix[x]=1;
		for (int i=0; i<v[x].size(); i++) {
			int to=v[x][i],sz=v[to].size();
			if (!fix[to] && !f[to]) {
				st.erase(st.find({D[to]*1.0/sz*1.0,to}));
				D[to]--;
				st.insert({D[to]*1.0/sz*1.0,to});
			}
		}
	}

	cout<<st.size()<<" \n";
	for (set < pair < double , int > > :: iterator it=st.begin(); it!=st.end(); it++)
		cout<<(*it).S<<" ";
}


#include<bits/stdc++.h>
using namespace std;
int n, m , k, x , y, buf[100001], pat[100001];
vector <int > vec[100001], ex, t;
bool check(double pos){
	for(int i = 1 ; i <= n ; i ++)
		buf[i] = vec[i].size(), pat[i] = ceil(buf[i] * pos);
	queue < int > s;
	for(int i : ex)s.push(i), buf[i] = 1e7;
	while(!s.empty()){
		for(int i: vec[s.front()]){
			if( -- buf[i] < pat[i])s.push(i), buf[i] = 1e7;
		}
		s.pop();
	}
	t.clear();
	for(int i = 1 ; i < n + 1 ; i ++)
		if(buf[i] < 1e5 + 1)t.push_back(i);
	return  t.size();
}
int main(){
	cin >> n >> m >> k;
	for(int i = 0 ; i < k ; i ++){
		cin >> x;
		ex.push_back(x);
	}
	for(int i = 0 ; i < m ; i ++){
		cin >> x >> y;
		vec[x].push_back(y);
		vec[y].push_back(x);
	}
	double st = 0 , en = 1, mid = (st + en) / 2;
	while(en - st > 1e-7){
		(check(mid) ? st : en ) = mid;
		mid = (st + en) / 2;
	}
	check((mid - 1e-6));
	printf("%d\n", t.size());
	for(int i = 0 ; i < t.size(); i ++){
		if(i)printf(" ");
		printf("%d", t[i]);
	}
	puts("");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n, m , k, x , y, buf[100001], pat[100001];
vector <int > vec[100001], ex, t;
bool check(long double pos){
	for(int i = 1 ; i <= n ; i ++)
		buf[i] = vec[i].size(), pat[i] = ceil(buf[i] * pos);
	queue < int > s;
	for(int i : ex)s.push(i), buf[i] = 1e7;
	while(!s.empty()){
		for(int i: vec[s.front()]){
			if( -- buf[i] < pat[i])s.push(i), buf[i] = 1e7;
		}
		s.pop();
	}
	t.clear();
	for(int i = 1 ; i < n + 1 ; i ++)
		if(buf[i] < 1e5 + 1)t.push_back(i);
	return  t.size();
}
int main(){
	cin >> n >> m >> k;
	for(int i = 0 ; i < k ; i ++){
		cin >> x;
		ex.push_back(x);
	}
	for(int i = 0 ; i < m ; i ++){
		cin >> x >> y;
		vec[x].push_back(y);
		vec[y].push_back(x);
	}
	double st = 0 , en = 1, mid = (st + en) / 2;
	while(en - st > 1e-12){
		(check(mid) ? st : en ) = mid;
		mid = (st + en) / 2;
	}
	check((mid - 1e-12));
	printf("%d\n", t.size());
	for(int i = 0 ; i < t.size(); i ++){
		if(i)printf(" ");
		printf("%d", t[i]);
	}
	puts("");
	return 0;
}


//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
using namespace std;

#define endl '\n'
#define lfs cout<<fixed<<setprecision(10)
#define ALL(a)  (a).begin(),(a).end()
#define ALLR(a)  (a).rbegin(),(a).rend()
#define spa << " " <<
#define fi first
#define se second
#define MP make_pair
#define MT make_tuple
#define PB push_back
#define EB emplace_back
#define rep(i,n,m) for(ll i = (n); i < (ll)(m); i++)
#define rrep(i,n,m) for(ll i = (ll)(m) - 1; i >= (ll)(n); i--)
using ll = long long;
using ld = long double;
const ll MOD1 = 1e9+7;
const ll MOD9 = 998244353;
const ll INF = 1e18;
using P = pair<ll, ll>;
template<typename T1, typename T2>bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
template<typename T1, typename T2>bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
ll median(ll a,ll b, ll c){return a+b+c-max({a,b,c})-min({a,b,c});}
void ans1(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}
void ans2(bool x){if(x) cout<<"YES"<<endl;else cout<<"NO"<<endl;}
void ans3(bool x){if(x) cout<<"Yay!"<<endl;else cout<<":("<<endl;}
template<typename T1,typename T2>void ans(bool x,T1 y,T2 z){if(x)cout<<y<<endl;else cout<<z<<endl;}
template<typename T>void debug(vector<vector<T>>&v,ll h,ll w){for(ll i=0;i<h;i++){cout<<v[i][0];for(ll j=1;j<w;j++)cout spa v[i][j];cout<<endl;}};
void debug(vector<string>&v,ll h,ll w){for(ll i=0;i<h;i++){for(ll j=0;j<w;j++)cout<<v[i][j];cout<<endl;}};
template<typename T>void debug(vector<T>&v,ll n){if(n!=0)cout<<v[0];for(ll i=1;i<n;i++)cout spa v[i];cout<<endl;};
template<typename T>vector<vector<T>>vec(ll x, ll y, T w){vector<vector<T>>v(x,vector<T>(y,w));return v;}
ll gcd(ll x,ll y){ll r;while(y!=0&&(r=x%y)!=0){x=y;y=r;}return y==0?x:y;}
vector<ll>dx={1,-1,0,0,1,1,-1,-1};vector<ll>dy={0,0,1,-1,1,-1,1,-1};
template<typename T>vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<typename... Ts>auto make_v(size_t a,Ts... ts){return vector<decltype(make_v(ts...))>(a,make_v(ts...));}
template<typename T1, typename T2>ostream &operator<<(ostream &os, const pair<T1, T2>&p){return os << p.first << " " << p.second;}
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v){for(auto &z:v)os << z << " ";cout<<"|"; return os;}
//mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
int popcount(ll x){return __builtin_popcountll(x);};
int poplow(ll x){return __builtin_ctzll(x);};
int pophigh(ll x){return 63 - __builtin_clzll(x);};
struct RationalNumber{
  long long a, b;
  RationalNumber(){
    a = 0,b = 1;
  }
  RationalNumber(long long p, long long q):a(p), b(q){// a / b
    reduction();
  };
  RationalNumber(long long p):a(p), b(1){// a / b
  };
  void reduction(){
    long long g = __gcd(a, b);
    a /= g, b /= g;
    if(b < 0)a *= -1,b *= -1;
  }
  RationalNumber &operator+=(const RationalNumber &x){
    long long q = b / __gcd(b, x.b) * x.b;
    a = a * (q / b) + x.a * (q / x.b);
    b = q;
    reduction();
    return *this;
  }
  RationalNumber &operator-=(const RationalNumber &x){
    long long q = b / __gcd(b, x.b) * x.b;
    a = a * (q / b) - x.a * (q / x.b);
    b = q;
    reduction();
    return *this;
  }
  RationalNumber &operator*=(const RationalNumber &x){
    long long q1 = __gcd(a, x.b), q2 = __gcd(b, x.a);
    a = (a / q1) * (x.a / q2), b = (b / q2) * (x.b / q1);
    return *this;
  }
  RationalNumber &operator/=(const RationalNumber &x){
    long long q1 = __gcd(a, x.a), q2 = __gcd(b, x.b);
    a = (a / q1) * (x.b / q2), b = (b / q2) * (x.a / q1);
    return *this;
  }
  RationalNumber operator+(const RationalNumber &x)const{
    return RationalNumber(*this) += x;
  }
  RationalNumber operator-(const RationalNumber &x)const{
    return RationalNumber(*this) -= x;
  }
  RationalNumber operator*(const RationalNumber &x)const{
    return RationalNumber(*this) *= x;
  }
  RationalNumber operator/(const RationalNumber &x)const{
    return RationalNumber(*this) /= x;
  }
  RationalNumber operator-()const{
    return RationalNumber(-a, b);
  }
  bool operator==(const RationalNumber &x)const{
    return a * x.b == b * x.a;
  };
  bool operator!=(const RationalNumber &x)const{
    return !(*this == x);
  };
  bool operator<(const RationalNumber &x)const{
    return a * x.b < b * x.a;
  }
  bool operator>(const RationalNumber &x)const{
    return a * x.b > b * x.a;
  }
  bool operator<=(const RationalNumber &x)const{
    return *this < x || *this == x;
  }
  bool operator>=(const RationalNumber &x)const{
    return *this > x || *this == x;
  }
  friend ostream &operator<<(ostream &os, RationalNumber x){
    return os << x.a << "/" << x.b;
  }
};
using rat=RationalNumber;
int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  ll res=0,buf=0;
  bool judge = true;
  ll n,m,k;cin>>n>>m>>k;
  vector<bool>f(n);
  rep(i,0,k){
    ll x;cin>>x;x--;
    f[x]=true;
  }
  set<pair<rat,ll>>st;
  vector<vector<ll>>g(n);
  rep(i,0,m){
    ll u,v;cin>>u>>v;u--;v--;
    g[u].PB(v);
    g[v].PB(u);
  }
  vector<ll>d(n),c(n);
  rep(i,0,n){
    d[i]=g[i].size();
    for(auto to:g[i]){
      if(!f[to])c[i]++;
    }
    if(!f[i]){
      st.emplace(rat(c[i],d[i]),i);
    }
  }
  vector<ll>v;
  pair<rat,ll> mx(rat(-1,1),-INF);
  while(st.size()>=1){
    auto p=*st.begin();
    //cout<<p<<endl;
    chmax(mx,MP(p.fi,(ll)v.size()));
    v.PB(p.se);
    st.erase(st.find(p));
    f[p.se]=true;
    for(auto to:g[p.se]){
      if(f[to])continue;
      st.erase(MP(rat(c[to],d[to]),to));
      c[to]--;
      st.insert(MP(rat(c[to],d[to]),to));
    }
  }
  //cout<<mx<<endl;
  //debug(c,n);
  //debug(f,n);
  vector<ll>ret;
  rep(i,0,v.size()){
    if(i>=mx.se)ret.PB(v[i]+1);
  }
  cout<<ret.size()<<endl;
  debug(ret,ret.size());
  return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 100005;

int n, m, k;
vector<int> a[N];
bool c[N];
int q[N];

struct ban
{
    int x;
    int q, qq;
    ban(){}
    ban(int x, int q, int qq)
    {
        this->x = x;
        this->q = q;
        this->qq = qq;
    }
};

bool so(int x1, int y1, int x2, int y2)
{
    return x1 * 1LL * y2 < x2 * 1LL * y1;
}

bool operator<(const ban& a, const ban& b)
{
    return !so(a.q, a.qq, b.q, b.qq);
}

int ti;
int in[N];

void solv()
{
    scanf("%d%d%d", &n, &m, &k);
    for (int i = 0; i < k; ++i)
    {
        int x;
        scanf("%d", &x);
        c[x] = true;
    }
    for (int i = 0; i < m; ++i)
    {
        int x, y;
        scanf("%d%d", &x, &y);
        a[x].push_back(y);
        a[y].push_back(x);
    }
    for (int x = 1; x <= n; ++x)
        q[x] = a[x].size();
    for (int x = 1; x <= n; ++x)
    {
        if (!c[x])
            continue;
        for (int i = 0; i < a[x].size(); ++i)
        {
            int h = a[x][i];
            --q[h];
        }
    }
    priority_queue<ban> pq;
    for (int x = 1; x <= n; ++x)
    {
        if (!c[x])
            pq.push(ban(x, q[x], a[x].size()));
    }
    int ansq = -1, ansqq = 1;
    int ans;
    while (1)
    {
        ban t;
        do
        {
            if (pq.empty())
            {
                vector<int> ansv;
                for (int i = 1; i <= n; ++i)
                {
                    if (in[i] >= ans)
                        ansv.push_back(i);
                }
                printf("%d\n", ansv.size());
                for (int i = 0; i < ansv.size(); ++i)
                    printf("%d ", ansv[i]);
                printf("\n");
                return;
            }
            t = pq.top();
            pq.pop();
        } while (c[t.x]);
        c[t.x] = true;
        in[t.x] = ++ti;
        if (!so(t.q, t.qq, ansq, ansqq))
        {
            ansq = t.q;
            ansqq = t.qq;
            ans = in[t.x];
        }
        for (int i = 0; i < a[t.x].size(); ++i)
        {
            int h = a[t.x][i];
            --q[h];
            if (!c[h])
                pq.push(ban(h, q[h], sz(a[h])));
        }
    }
}

int main()
{
    #ifdef SOMETHING
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    #endif // SOMETHING
    solv();
    return 0;
}

//while ((double)clock() / CLOCKS_PER_SEC <= 0.9){}


//minamoto
#include<bits/stdc++.h>
#define R register
#define fp(i,a,b) for(R int i=(a),I=(b)+1;i<I;++i)
#define fd(i,a,b) for(R int i=(a),I=(b)-1;i>I;--i)
#define go(u) for(int i=head[u],v=e[i].v;i;i=e[i].nx,v=e[i].v)
template<class T>inline bool cmax(T&a,const T&b){return a<b?a=b,1:0;}
template<class T>inline bool cmin(T&a,const T&b){return a>b?a=b,1:0;}
using namespace std;
const int N=1e5+5;
struct eg{int v,nx;}e[N<<1];int head[N],tot;
inline void add(R int u,R int v){e[++tot]={v,head[u]},head[u]=tot;}
int sz[N],deg[N],vis[N],ins[N],n,m,L;
struct node{
	int u,x,y;
	inline node(){}
	inline node(R int uu,R int xx,R int yy):u(uu),x(xx),y(yy){}
	inline bool operator <(const node &b)const{return 1ll*x*b.y>1ll*y*b.x;}
};
priority_queue<node>q;
int st[N],top,x,y,mp,nd;
int main(){
//	freopen("testdata.in","r",stdin);
	scanf("%d%d%d",&n,&m,&L);
	for(R int i=1,x;i<=L;++i)scanf("%d",&x),vis[x]=1;
	for(R int i=1,u,v;i<=m;++i){
		scanf("%d%d",&u,&v),add(u,v),add(v,u),++sz[u],++sz[v];
		deg[u]+=vis[v]^1,deg[v]+=vis[u]^1;
	}
	fp(i,1,n)if(!vis[i])q.push(node(i,deg[i],sz[i])),ins[i]=1,++nd;
	x=0,y=1;
	for(R int u;top<nd;){
		while(233){
			u=q.top().u;
			if(ins[u]&&deg[u]==q.top().x)break;
			q.pop();
		}
		st[++top]=u,ins[u]=0,q.pop();
		if(1ll*x*sz[u]<1ll*y*deg[u])x=deg[u],y=sz[u],mp=top;
		go(u)--deg[v],q.push(node(v,deg[v],sz[v]));
	}
	printf("%d\n",top-mp+1);
	fp(i,mp,top)printf("%d%c",st[i]," \n"[i==top]);
	return 0;
}


//minamoto
#include<bits/stdc++.h>
#define R register
#define fp(i,a,b) for(R int i=(a),I=(b)+1;i<I;++i)
#define fd(i,a,b) for(R int i=(a),I=(b)-1;i>I;--i)
#define go(u) for(int i=head[u],v=e[i].v;i;i=e[i].nx,v=e[i].v)
template<class T>inline bool cmax(T&a,const T&b){return a<b?a=b,1:0;}
template<class T>inline bool cmin(T&a,const T&b){return a>b?a=b,1:0;}
using namespace std;
const int N=1e5+5;
struct eg{int v,nx;}e[N<<1];int head[N],tot;
inline void add(R int u,R int v){e[++tot]={v,head[u]},head[u]=tot;}
int sz[N],deg[N],vis[N],ins[N],n,m,L;
struct node{
	int u,x,y;
	inline node(){}
	inline node(R int uu,R int xx,R int yy):u(uu),x(xx),y(yy){}
	inline bool operator <(const node &b)const{return 1ll*x*b.y>1ll*y*b.x;}
};
priority_queue<node>q;
int st[N],top,x,y,mp,nd;
int main(){
//	freopen("testdata.in","r",stdin);
	scanf("%d%d%d",&n,&m,&L);
	for(R int i=1,x;i<=L;++i)scanf("%d",&x),vis[x]=1;
	for(R int i=1,u,v;i<=m;++i){
		scanf("%d%d",&u,&v),add(u,v),add(v,u),++sz[u],++sz[v];
		deg[u]+=vis[v]^1,deg[v]+=vis[u]^1;
	}
	fp(i,1,n)if(!vis[i])q.push(node(i,deg[i],sz[i])),ins[i]=1,++nd;
	x=0,y=1,mp=1;
	for(R int u;top<nd;){
		while(233){
			u=q.top().u;
			if(ins[u]&&deg[u]==q.top().x)break;
			q.pop();
		}
		st[++top]=u,ins[u]=0,q.pop();
		if(1ll*x*sz[u]<1ll*y*deg[u])x=deg[u],y=sz[u],mp=top;
		go(u)--deg[v],q.push(node(v,deg[v],sz[v]));
	}
	printf("%d\n",top-mp+1);
	fp(i,mp,top)printf("%d%c",st[i]," \n"[i==top]);
	return 0;
}


// #pragma GCC optimize("O3")
// #pragma GCC target("sse4")

#include <bits/stdc++.h>

using namespace std;

#define GET_MACRO(_1, _2, _3, _4, NAME, ...) NAME
#define __FOR3(i, a, n, inc) for(int i = (a); (inc) > 0 ? i < (n) : i >= (n); i += (inc))
#define __FOR2(i, a, n) __FOR3(i, a, n, 1)
#define __FOR1(i, n) __FOR2(i, 0, n)
#define FOR(...) GET_MACRO(__VA_ARGS__, __FOR3, __FOR2, __FOR1)(__VA_ARGS__)

#define BOOST 			ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ELO             exit(0)
#define ALL(a) 			(a).begin(), (a).end()
#define SZ(a) 			(int)(a).size()
#define TRAV(a, b) 		for (auto& a : b)
#define REV(a)          reverse(ALL(a))
#define SORT(a)         sort(ALL(a))
#define SORTR(a)        SORT(a), REV(a)
#define PB              push_back
#define F               first
#define S               second
using ll = 				long long;
using ld = 				long double; // 'long double' is 2.2 times slower than double
using pii = 			pair<int, int>;
using pll = 			pair<ll, ll>;
using pld =             pair<ld, ld>;
using vi = 				vector<int>;
using vvi =             vector<vi>;
using vll = 			vector<ll>;
using vvll =            vector<vll>;
using vpii = 			vector<pii>;
using vpll = 			vector<pll>;
using vld =             vector<ld>;
using vpld =            vector<pld>;

constexpr int MOD = 1e9 + 7; // 998244353
constexpr int INF = MOD;
constexpr ll LLINF = 1e18;
const ld PI = acos(-1);

template <class T> inline bool setmin(T& a, T b) {if (a > b) return a = b, 1; return 0; }
template <class T> inline bool setmax(T& a, T b) {if (a < b) return a = b, 1; return 0; }

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template <class key, class cmp = less<key>> using ordered_set = tree<key, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
template <class key, class cmp = less_equal<key>> using ordered_multiset = tree<key, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
//* find_by_order(k) - returns an iterator to the k-th largest element (counting from zero)
//* order_of_key(k)  - the number of items in a set that are strictly smaller than k.
template <class key, class value, class cmp = less<key>> using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
using pref_trie = trie<string, null_type, trie_string_access_traits<>, pat_trie_tag, trie_prefix_search_node_update>;
// * prefix_range(s) - return iterator range, prefix equal to s

namespace input {
    template <class T> istream &operator>>(istream &os, vector<T> & vec) { for (auto& u : vec) os >> u; return os; }
    template<class T1, class T2> istream& operator>>(istream& os, pair<T1, T2>& p) { return os >> p.first >> p.second; }
    template <class T, size_t N> istream& operator>>(istream& os, array<T, N>& a) { for (auto& u : a) os >> u; return os; }

    void re() {}
    template <typename T, typename... args> void re(T& x, args&... tail) { cin >> x; re(tail...); }
} // namespace input
using namespace input;

namespace output {
    template <class T> ostream &operator<<(ostream &os, const vector<T> & vec){for (const auto& u : vec) os << u << " "; return os; }
    template<class T1, class T2> ostream& operator<<(ostream& os, const pair<T1, T2>& p) { return os << p.first << " " << p.second; }
    template <class T> ostream &operator<<(ostream &os, set<T> & con) { for (const auto& u : con) os << u << " "; return os; }
    template <class T, size_t N> ostream& operator<<(ostream& os, array<T, N>& a) { for (const auto& u : a) os << u << " "; return os; }

    void pr() {}
    template <typename T> void pr(const T& x) { cout << x; }
    template <typename T, typename... args> void pr(const T& x, const args&... tail) { cout << x << " "; pr(tail...);}
    template <typename T> void prs(const T& x) { cout << x << " "; }
    template <typename T, typename... args> void prs(const T& x, const args&... tail) { cout << x << " "; prs(tail...);}
    template <typename... args> void prln(const args&... tail) { pr(tail...); cout << "\n";}
} // namespace output
using namespace output;

namespace pair_magic {
	#define PT1T2 pair<T1,T2>
	#define TT1T2 template<class T1, class T2>
	TT1T2 inline PT1T2 operator+(const PT1T2 &p1, const PT1T2 &p2) { return PT1T2(p1.first + p2.first, p1.second + p2.second); }
	TT1T2 inline PT1T2& operator+=(PT1T2 &p1, const PT1T2 &p2) { p1.first += p2.first, p1.second += p2.second; return p1; }
	TT1T2 inline PT1T2 operator-(const PT1T2 &p1, const PT1T2 &p2) { return PT1T2(p1.first - p2.first, p1.second - p2.second); }
	TT1T2 inline PT1T2& operator-=(PT1T2 &p1, const PT1T2 &p2) { p1.first -= p2.first, p1.second -= p2.second; return p1; }
	#undef PT1T2
	#undef TT1T2
}
using namespace pair_magic;

namespace random_nsp {
	thread_local std::mt19937 gen{std::random_device{}()};
	template <typename T>T random(T min, T max){using dist = std::conditional_t<std::is_integral<T>::value, std::uniform_int_distribution<T>, std::uniform_real_distribution<T>>;return dist{min, max}(gen);}
	template <typename T> T randomINT(T min, T max) { return std::uniform_int_distribution<T>{min, max}(gen); }
}
using namespace random_nsp;

namespace triple {
	#define TT1T2T3 template<class T1, class T2, class T3>
	#define TRT1T2T3  triple<T1, T2, T3>
	TT1T2T3 struct triple { T1 a; T2 b; T3 c; triple() : a(T1()), b(T2()), c(T3()) {}; triple(T1 _a, T2 _b, T3 _c) :a(_a), b(_b), c(_c) {} };
	TT1T2T3 bool operator<(const TRT1T2T3&t1, const TRT1T2T3&t2) { if (t1.a != t2.a)return t1.a < t2.a; else if (t1.b != t2.b)return t1.b < t2.b; else return t1.c < t2.c; }
	TT1T2T3 bool operator>(const TRT1T2T3&t1, const TRT1T2T3&t2) { if (t1.a != t2.a)return t1.a > t2.a; else if (t1.b != t2.b)return t1.b > t2.b; else return t1.c > t2.c; }
	TT1T2T3 bool operator==(const TRT1T2T3&t1, const TRT1T2T3&t2) { return (t1.a == t2.a && t1.b == t2.b && t1.c == t2.c); }
	TT1T2T3 inline istream& operator >> (istream& os, triple<T1, T2, T3>& t) { return os >> t.a >> t.b >> t.c; }
	TT1T2T3 ostream& operator << (ostream& os, const triple<T1, T2, T3>& t) { return os << t.a << " " << t.b << " " << t.c; }
	#undef TRT1T2T3
	#undef TT1T2T3
	using tri =  triple<int, int, int>;
	using trll = triple<ll, ll, ll>;
	using vtri = vector<tri>;
    using vtrll = vector<trll>;
}
using namespace triple;

template <class T> T invGeneral(T a, T b) { // 0 < a < b, gcd(a,b) = 1
    a %= b;
    if (a == 0) return b == 1 ? 0 : -1;
    T x = invGeneral(b, a);
    return x == -1 ? -1 : ((1-(ll)b * x) / a + b) % b;
}

template<class T> struct modular {
	T val;
	explicit operator T() const { return val; }
	modular() { val = 0; }
	modular(const ll& v) {
		val = (-MOD <= v && v <= MOD) ? v : v % MOD;
		if (val < 0) val += MOD;
	}

	friend ostream& operator<<(ostream& os, const modular& a) { return os << a.val; }
	friend void pr(const modular& a) { pr(a.val); }
	friend void re(modular& a) { ll x; re(x); a = modular(x); }

	friend bool operator==(const modular& a, const modular& b) { return a.val == b.val; }
	friend bool operator!=(const modular& a, const modular& b) { return !(a == b); }
	friend bool operator<(const modular& a, const modular& b) { return a.val < b.val; }

	modular operator-() const { return modular(-val); }
	modular& operator+=(const modular& m) { if ((val += m.val) >= MOD) val -= MOD; return *this; }
	modular& operator-=(const modular& m) { if ((val -= m.val) < 0) val += MOD; return *this; }
	modular& operator*=(const modular& m) { val = (ll)val*m.val%MOD; return *this; }
	friend modular pow(modular a, ll p) {
		modular ans = 1; for (; p; p /= 2, a *= a) if (p&1) ans *= a;
		return ans;
	}
	friend modular inv(const modular& a) {
		auto i = invGeneral(a.val,MOD); assert(i != -1);
		return i;
	} // equivalent to return exp(b,MOD-2) if MOD is prime
	modular& operator/=(const modular& m) { return (*this) *= inv(m); }

	friend modular operator+(modular a, const modular& b) { return a += b; }
	friend modular operator-(modular a, const modular& b) { return a -= b; }
	friend modular operator*(modular a, const modular& b) { return a *= b; }
	friend modular operator/(modular a, const modular& b) { return a /= b; }
};

using mi = modular<int>;
using pmi = pair<mi,mi>;
using vmi = vector<mi>;
using vpmi = vector<pmi>;

namespace debug {
    template < typename _T > inline void _debug(const char *s, _T x) { cerr << s << " = " << x << "\n"; }
    template < typename _T, typename... args > void _debug(const char *s, _T x, args... a) { while(*s != ',') cerr << *s++; cerr << " = " << x << ','; _debug(s + 1, a...); }

    #if 0
        #define debug(...) _debug(#__VA_ARGS__, __VA_ARGS__)
        #define cerr cout
    #else
        #define debug(...) 1999
        #define cerr if(0) cout
    #endif
} // namespace debug
using namespace debug;

//////////////_________CODE_________//////////////

const int N = 1e5 + 7;
bitset<N> zly, done;
vi graf[N];
int deg[N];
int zle[N];
int n, m, k;

int main() {
    BOOST;
	re(n, m, k);
	FOR(i, k) {
		int x; re(x);
		zly[x - 1] = true;
	}

	FOR(i, m) {
		int a, b; re(a, b);
		a--, b--;
		deg[a]++, deg[b]++;
		graf[a].PB(b);
		graf[b].PB(a);
	}

	FOR(i, n) {
		if(zly[i]) {
			TRAV(v, graf[i]) {
				zle[v]++;
			}
		}
	}

	auto cmp = [](int a, int b) {
		ll t1 = 1ll * zle[a] * deg[b];
		ll t2 = 1ll * zle[b] * deg[a];
		if(t1 != t2) return t1 > t2;
		return a > b;
	};

	set<int, decltype(cmp)> Q(cmp);

	FOR(i, n) if(!zly[i]) {
		Q.insert(i);
	}

	vi wyw;
	int id = -1;
	ll a = 1, b = 1;
	while(SZ(Q)) {
		int u = *Q.begin(); Q.erase(Q.begin());
		wyw.PB(u);
		done[u] = true;

		ll x = zle[u], y = deg[u];
		debug(u + 1, x, y);
		debug(a, b, x, y);
		debug("*******");
		if(a * y > b * x) {
			a = x, b = y;
			id = SZ(wyw) - 2;
			debug(id);
		}

		TRAV(v, graf[u]) {
			if(!done[v] and !zly[v]) {
				Q.erase(Q.find(v));
				zle[v]++;
				Q.insert(v);
			}
		}
	}

	vi res;
	FOR(i, id + 1, SZ(wyw)) {
		res.PB(wyw[i] + 1);
	}

	prln(SZ(res));
	prln(res);
}


#ifdef ONPC
# define _GLIBCXX_DEBUG
#define deb(a) cerr << "nu smotri pidor " << #a << " = " << a << endl;
#else
#define deb(a)
#endif
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;

typedef long long ll;
typedef long double ld;
ll MOD = 1e9 + 7;

const int N = 200000;
ll used[N];
vector<ll> gr[N];
ld eps = 1e-8;

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout << fixed << setprecision(20);
    ll n, m, k;
    cin >> n >> m >> k;
    for(int i = 0; i < k; i++){
        ll tmp;
        cin >> tmp;
        tmp--;
        used[tmp] = 2;
    }
    for (int i = 0; i < m; i++){
        ll u, v;
        cin >> u >> v;
        u--, v--;
        gr[u].push_back(v);
        gr[v].push_back(u);
    }
    ld L = 0, R = 1;
    vector<ll> ans;
    while (R - L > eps){
        ld mid = (L + R) / 2;
        vector<ll> st(n);
        vector<ll> st2(n);
        queue<ll> q;
        for (int i = 0; i < n; i++){
            if (!used[i]){
                st[i] = ceil(gr[i].size() * mid);
            }
            ll kol = 0;
            for (auto j : gr[i]){
                if (!used[j]){
                    kol++;
                }
            }
            st2[i] = kol;
            if(kol < st[i]){
                q.push(i);
                used[i] = 1;
            }
        }
        while (q.size()){
            ll v = q.front();
            q.pop();
            for (auto j : gr[v]){
                if (!used[j]){
                    st2[j]--;
                    if (st2[j] < st[j]){
                        used[j] = 1;
                        q.push(j);
                    }
                }
            }
        }
        vector<ll> an;
        for (int i = 0; i < n; i++){
            if (!used[i]){
                an.push_back(i);
            }
            else{
                if (used[i] == 1){
                    used[i] = 0;
                }
            }
        }
        if (an.size()){
            ans = an;
            L = mid;
        }
        else{
            R = mid;
        }
    }
    //cout << L;
    cout << ans.size() << endl;
    for (auto i : ans){
        cout << i + 1 << " ";
    }
#ifdef ONPC
    cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}
//egor lox


#ifdef ONPC
# define _GLIBCXX_DEBUG
#define deb(a) cerr << "nu smotri pidor " << #a << " = " << a << endl;
#else
#define deb(a)
#endif
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;

typedef long long ll;
typedef long double ld;
ll MOD = 1e9 + 7;

const int N = 200000;
ll used[N];
vector<ll> gr[N];
ld eps = 1e-8;

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout << fixed << setprecision(20);
    ll n, m, k;
    cin >> n >> m >> k;
    for(int i = 0; i < k; i++){
        ll tmp;
        cin >> tmp;
        tmp--;
        used[tmp] = 2;
    }
    for (int i = 0; i < m; i++){
        ll u, v;
        cin >> u >> v;
        u--, v--;
        gr[u].push_back(v);
        gr[v].push_back(u);
    }
    ld L = 0, R = 1;
    vector<ll> ans;
    while (R - L > eps){
        ld mid = (L + R) / 2;
        vector<ll> st(n);
        vector<ll> st2(n);
        queue<ll> q;
        for (int i = 0; i < n; i++){
            if (!used[i]){
                st[i] = ceil(gr[i].size() * mid);
            }
            ll kol = 0;
            for (auto j : gr[i]){
                if (!used[j]){
                    kol++;
                }
            }
            st2[i] = kol;
            if(kol < st[i]){
                q.push(i);
                used[i] = 1;
            }
        }
        while (q.size()){
            ll v = q.front();
            q.pop();
            for (auto j : gr[v]){
                if (!used[j]){
                    st2[j]--;
                    if (st2[j] < st[j]){
                        used[j] = 1;
                        q.push(j);
                    }
                }
            }
        }
        vector<ll> an;
        for (int i = 0; i < n; i++){
            if (!used[i]){
                an.push_back(i);
            }
            else{
                if (used[i] == 1){
                    used[i] = 0;
                }
            }
        }
        if (an.size()){
            ans = an;
            L = mid;
        }
        else{
            R = mid;
        }
    }
    //cout << L;
    if (!ans.size())
    {
        for (int i = 0; i < n; i++){
            if (!used[i]){
                cout << 1 << endl;
                cout << i + 1;
                return 0;
            }
        }
    }
    cout << ans.size() << endl;
    for (auto i : ans){
        cout << i + 1 << " ";
    }
#ifdef ONPC
    cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}
//egor lox


#ifdef ONPC
# define _GLIBCXX_DEBUG
#define deb(a) cerr << "nu smotri pidor " << #a << " = " << a << endl;
#else
#define deb(a)
#endif
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;

typedef long long ll;
typedef long double ld;
ll MOD = 1e9 + 7;

const int N = 200000;
ll used[N];
vector<ll> gr[N];
ld eps = 1e-8;

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout << fixed << setprecision(20);
    ll n, m, k;
    cin >> n >> m >> k;
    for(int i = 0; i < k; i++){
        ll tmp;
        cin >> tmp;
        tmp--;
        used[tmp] = 2;
    }
    for (int i = 0; i < m; i++){
        ll u, v;
        cin >> u >> v;
        u--, v--;
        gr[u].push_back(v);
        gr[v].push_back(u);
    }
    ld L = 0, R = 1;
    vector<ll> ans;
    while (R - L > eps){
        ld mid = (L + R) / 2;
        vector<ll> st(n);
        vector<ll> st2(n);
        queue<ll> q;
        for (int i = 0; i < n; i++){
            if (!used[i]){
                st[i] = ceil(gr[i].size() * mid);
                ll kol = 0;
                for (auto j : gr[i]){
                    if (!used[j]){
                        kol++;
                    }
                }
                st2[i] = kol;
            }
        }
        for (int i = 0; i < n; i++){
            if (!used[i]){
                if(st2[i] < st[i]){
                    q.push(i);
                    used[i] = 1;
                }
            }
        }
        while (q.size()){
            ll v = q.front();
            q.pop();
            for (auto j : gr[v]){
                if (!used[j]){
                    st2[j]--;
                    if (st2[j] < st[j]){
                        used[j] = 1;
                        q.push(j);
                    }
                }
            }
        }
        vector<ll> an;
        for (int i = 0; i < n; i++){
            if (!used[i]){
                an.push_back(i);
            }
            else{
                if (used[i] == 1){
                    used[i] = 0;
                }
            }
        }
        if (an.size()){
            ans = an;
            L = mid;
        }
        else{
            R = mid;
        }
    }
    //cout << L;
    if (!ans.size())
    {
        for (int i = 0; i < n; i++){
            if (!used[i]){
                cout << 1 << endl;
                cout << i + 1;
                return 0;
            }
        }
    }
    cout << ans.size() << endl;
    for (auto i : ans){
        cout << i + 1 << " ";
    }
#ifdef ONPC
    cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}
//egor lox


#pragma region Macros
#pragma GCC optimize("O3")
#pragma GCC target("avx2,avx")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for(ll i = a; i <= b; ++i)
#define rep(i, n) for(ll i = 0; i < n; ++i)
#define rep3(i, a, b) for(ll i = a; i >= b; --i)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define eb emplace_back
#define vi vector<int>
#define vll vector<ll>
#define vpi vector<pii>
#define vpll vector<pll>
#define overload2(_1, _2, name, ...) name
#define vec(type, name, ...) vector<type> name(__VA_ARGS__)
#define VEC(type, name, size)                                                                                \
    vector<type> name(size);                                                                                \
    IN(name)
#define vv(type, name, h, ...) vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define VV(type, name, h, w)                                                                                \
    vector<vector<type>> name(h, vector<type>(w));                                                                                \
    IN(name)
#define vvv(type, name, h, w, ...) vector<vector<vector<type>>> name(h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...)                                                                                \
    vector<vector<vector<vector<type>>>> name(a, vector<vector<vector<type>>>(b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))
#define fi first
#define se second
#define all(c) begin(c), end(c)
#define lb(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define ub(c, x) distance((c).begin(), upper_bound(all(c), (x)))
using namespace std;
string YES[2] = {"NO", "YES"};
string Yes[2] = {"No", "Yes"};
string yes[2] = {"no", "yes"};
template <class T> using pq = priority_queue<T>;
template <class T> using pqg = priority_queue<T, vector<T>, greater<T>>;
#define si(c) (int)(c).size()
#define INT(...)                                                                                \
    int __VA_ARGS__;                                                                                \
    IN(__VA_ARGS__)
#define LL(...)                                                                                \
    ll __VA_ARGS__;                                                                                \
    IN(__VA_ARGS__)
#define STR(...)                                                                                \
    string __VA_ARGS__;                                                                                \
    IN(__VA_ARGS__)
#define CHR(...)                                                                                \
    char __VA_ARGS__;                                                                                \
    IN(__VA_ARGS__)
#define DBL(...)                                                                                \
    double __VA_ARGS__;                                                                                \
    IN(__VA_ARGS__)
int scan() { return getchar(); }
void scan(int &a) { cin >> a; }
void scan(long long &a) { cin >> a; }
void scan(char &a) { cin >> a; }
void scan(double &a) { cin >> a; }
void scan(string &a) { cin >> a; }
template <class T, class S> void scan(pair<T, S> &p) { scan(p.first), scan(p.second); }
template <class T> void scan(vector<T> &);
template <class T> void scan(vector<T> &a) {
    for(auto &i : a) scan(i);
}
template <class T> void scan(T &a) { cin >> a; }
void IN() {}
template <class Head, class... Tail> void IN(Head &head, Tail &... tail) {
    scan(head);
    IN(tail...);
}
template <class T, class S> inline bool chmax(T &a, S b) {
    if(a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T, class S> inline bool chmin(T &a, S b) {
    if(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
vi iota(int n) {
    vi a(n);
    iota(all(a), 0);
    return a;
}
template <typename T> vi iota(vector<T> &a, bool greater = false) {
    vi res(a.size());
    iota(all(res), 0);
    sort(all(res), [&](int i, int j) {
        if(greater) return a[i] > a[j];
        return a[i] < a[j];
    });
    return res;
}
#define UNIQUE(x) sort(all(x)), x.erase(unique(all(x)), x.end())
vector<pll> factor(ll x) {
    vector<pll> ans;
    for(ll i = 2; i * i <= x; i++)
        if(x % i == 0) {
            ans.push_back({i, 1});
            while((x /= i) % i == 0) ans.back().second++;
        }
    if(x != 1) ans.push_back({x, 1});
    return ans;
}
template <class T> vector<T> divisor(T x) {
    vector<T> ans;
    for(T i = 1; i * i <= x; i++)
        if(x % i == 0) {
            ans.pb(i);
            if(i * i != x) ans.pb(x / i);
        }
    return ans;
}
template <typename T> void zip(vector<T> &x) {
    vector<T> y = x;
    sort(all(y));
    for(int i = 0; i < x.size(); ++i) { x[i] = lb(y, x[i]); }
}
int popcount(ll x) { return __builtin_popcountll(x); }
struct Setup_io {
    Setup_io() {
        ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
        cout << fixed << setprecision(15);
    }
} setup_io;
int in() {
    int x;
    cin >> x;
    return x;
}
ll lin() {
    unsigned long long x;
    cin >> x;
    return x;
}

template <typename T> struct edge {
    int from, to;
    T cost;
    int id;
    edge(int to, T cost) : from(-1), to(to), cost(cost) {}
    edge(int from, int to, T cost) : from(from), to(to), cost(cost) {}
    edge(int from, int to, T cost, int id) : from(from), to(to), cost(cost), id(id) {}
    edge &operator=(const int &x) {
        to = x;
        return *this;
    }
    operator int() const { return to; }
};
template <typename T> using Edges = vector<edge<T>>;

using Tree = vector<vector<int>>;
using Graph = vector<vector<int>>;
template <class T> using Wgraph = vector<vector<edge<T>>>;
Graph getG(int n, int m = -1, bool directed = false, int margin = 1) {
    Tree res(n);
    if(m == -1) m = n - 1;
    while(m--) {
        int a, b;
        cin >> a >> b;
        a -= margin, b -= margin;
        res[a].emplace_back(b);
        if(!directed) res[b].emplace_back(a);
    }
    return move(res);
}
template <class T> Wgraph<T> getWg(int n, int m = -1, bool directed = false, int margin = 1) {
    Wgraph<T> res(n);
    if(m == -1) m = n - 1;
    while(m--) {
        int a, b;
        T c;
        cin >> a >> b >> c;
        a -= margin, b -= margin;
        res[a].emplace_back(b, c);
        if(!directed) res[b].emplace_back(a, c);
    }
    return move(res);
}

#define i128 __int128_t
#define ull unsigned long long int
#define TEST                                                                                \
    INT(testcases);                                                                                \
    while(testcases--)
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
    for(auto &e : v) cout << e << " ";
    cout << endl;
    return os;
}
template <class T, class S> ostream &operator<<(ostream &os, const pair<T, S> &p) {
    cout << "(" << p.fi << ", " << p.se << ")";
    return os;
}
template <class S, class T> string to_string(pair<S, T> p) { return "(" + to_string(p.first) + "," + to_string(p.second) + ")"; }
template <class A> string to_string(A v) {
    if(v.empty()) return "{}";
    string ret = "{";
    for(auto &x : v) ret += to_string(x) + ",";
    ret.back() = '}';
    return ret;
}

void dump() { cerr << endl; }
template <class Head, class... Tail> void dump(Head head, Tail... tail) {
    cerr << to_string(head) << " ";
    dump(tail...);
}
#define endl '\n'
#ifdef _LOCAL
#undef endl
#define debug(x)                                                                                \
    cout << #x << ": ";                                                                                \
    dump(x)
#else
#define debug(x)
#endif
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int rnd(int n) { return uniform_int_distribution<int>(0, n - 1)(rng); }
// ll rndll(ll n) { return uniform_int_distribution<ll>(0, n - 1)(rng); }

template <typename T> static constexpr T inf = numeric_limits<T>::max() / 2;
#pragma endregion

// q / p
struct frac {
    template <typename T> static constexpr inline T gcd(const T a, const T b) { return (b == 0) ? a : gcd(b, a % b); }
    ll q, p;
    inline constexpr void simplify() {
        if(p < 0) {
            p *= -1;
            q *= -1;
        }
        ll g = gcd(q < 0 ? -q : q, p);
        if(g) {
            p /= g;
            q /= g;
        }
    }
    constexpr frac(ll q = 0, ll p = 1) noexcept : q(q), p(p) { simplify(); }

    constexpr bool operator<(const frac &r) const { return q * r.p < p * r.q; }
    constexpr bool operator<=(const frac &r) const { return q * r.p <= p * r.q; }
    constexpr bool operator>(const frac &r) const { return q * r.p > p * r.q; }
    template <class T> const bool operator<(const T &r) const { return *this < frac(r); }
    template <class T> const bool operator>(const T &r) const { return *this > frac(r); }
    constexpr bool operator!=(const frac &r) const { return q * r.p < p * r.q; }
    constexpr bool operator==(const frac &r) const { return q * r.p == p * r.q; }
    constexpr frac operator+(const frac r) const noexcept { return frac(*this) += r; }
    constexpr frac operator-(const frac r) const noexcept { return frac(*this) -= r; }
    constexpr frac operator*(const frac r) const noexcept { return frac(*this) *= r; }
    constexpr frac operator/(const frac r) const noexcept { return frac(*this) /= r; }
    constexpr frac &operator+=(const frac &r) noexcept {
        ll g = gcd(p, r.p);
        q = r.p / g * q + p / g * r.q;
        p = p / g * r.p;
        (*this).simplify();
        return *this;
    }
    constexpr frac &operator-=(const frac &r) noexcept {
        ll g = gcd(p, r.p);
        q = r.p / g * q - p / g * r.q;
        p = p / g * r.p;
        (*this).simplify();
        return *this;
    }
    constexpr frac &operator*=(const frac &r) noexcept {
        q *= r.q;
        p *= r.p;
        (*this).simplify();
        return *this;
    }
    constexpr frac &operator/=(const frac &r) noexcept {
        q *= r.p;
        p *= r.q;
        (*this).simplify();
        return *this;
    }

    void print() {
        long double tmp = (long double)q / (long double)p;
        cout << tmp;
    }
};
ostream &operator<<(ostream &os, frac r) {
    os << r.q << "/" << r.p;
    return os;
}

int main() {
    INT(n, m, k);
    VEC(int, a, k);
    Graph g = getG(n, m);
    rep(i, k) a[i]--;
    vi deg(n), out(n), used(n);
    rep(i, n) for(auto e : g[i]) deg[e]++;
    rep(i, k) for(auto e : g[a[i]]) out[e]++;
    // dump(deg, out);
    rep(i, k) used[a[i]] = true;
    int res = n - k;
    pqg<pair<frac, int>> p;
    rep(i, n) if(!used[i]) p.emplace(frac(deg[i] - out[i], deg[i]), i);
    while(res and !p.empty()) {
        auto [tmp, i] = p.top();
        p.pop();
        if(used[i]) continue;
        queue<int> q({i});
        used[i] = true, res--;
        vi now{i + 1};
        while(!q.empty()) {
            int t = q.front();
            q.pop();
            for(auto e : g[t])
                if(!used[e]) {
                    out[e]++;
                    if(frac(deg[e] - out[e], deg[e]) <= tmp) {
                        used[e] = true, res--, now.eb(e + 1);
                        q.emplace(e);
                    } else
                        p.emplace(frac(deg[e] - out[e], deg[e]), e);
                }
        }
        // cout << tmp << " " << i << " " << res << endl;
        // dump(now);
        if(!res) {
            cout << si(now) << endl << now;
            exit(0);
        }
    }
}


#include <iostream>
#include <vector>
#include <queue>
#include <iomanip>

using namespace std;

#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))

using ll = long long;
using ld = long double;

int const nmax = 100000;
vector<int> g[1 + nmax];
ld const precision = 30;
int fort[1 + nmax], active[1 + nmax];
ld frec[1 + nmax];

struct Number{
  ld rat;
  int id;
  bool operator < (Number const &a) const{
    return a.rat < rat;
  }
};

bool solve(int n, ld rat){
  for(int i = 1;i <= n; i++)
    frec[i] = 0;

  for(int i = 1; i <= n; i++)
    if(fort[i] == 0)
      active[i] = 1;
    else
      active[i] = 0;

  for(int i = 1; i <= n; i++)
    if(active[i] == 1)
      for(int h = 0; h < g[i].size(); h++)
        frec[g[i][h]] += 1;

  priority_queue<Number> pq;
  for(int i = 1;i <= n; i++)
    if(active[i] == 1)
      pq.push({frec[i] / g[i].size(), i});

  while(0 < pq.size()){
    Number pqtop = pq.top();
    pq.pop();
    if(active[pqtop.id] == 0)
      continue;
    if(pqtop.rat < rat) {
      int node = pqtop.id;
      active[node] = 0;
      for(int h = 0; h < g[node].size(); h++){
        int to = g[node][h];
        frec[to] -= 1;
        if(active[to] == 1)
          pq.push({frec[to] / g[to].size(), to});
      }
    }
  }

  for(int i = 1;i <= n; i++)
    if(active[i] == 1)
      return 1;
  return 0;
}

int main()
{
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);

  int n, m, k;
  cin >> n >> m >> k;
  for(int i = 1;i <= k; i++){
    int val;
    cin >> val;
    fort[val] = 1;
  }

  for(int i = 1;i <= m; i++){
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }

  ld from = 0, to = 1;
  for(int i = 1;i <= precision; i++){
    ld mid = (to + from) / 2;
    if(solve(n, mid) == 1)
      from = mid;
    else
      to = mid;
  }
  solve(n, from);

  int sz = 0;
  for(int i = 1;i <= n; i++)
    sz += active[i];
  cout << sz << '\n';
  for(int i = 1;i <= n; i++)
    if(active[i] == 1)
      cout << i << " ";
  return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/priority_queue.hpp>
//#pragma GCC optimize("O3")
//#pragma GCC target("sse4")
//#pragma GCC target("avx2")

#define deb(x) cout << #x << " = " << x << "\n"
#define all(x) (x).begin(), (x).end()
#define len(x) (int) x.size()
#define lsb(x) (x) & -(x)
#define l(x) (x << 1) + 1
#define r(x) (x << 1) + 2

#define xx first
#define yy second
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound

using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ld, ld> pld;
typedef pair <ll, ll> pll;

template <class T1, class T2 = less <T1>> using pb_heap = __gnu_pbds::priority_queue <T1, T2, binary_heap_tag>;
template <class T1, class T2 = null_type, class T3 = less <T1>> using pb_map = tree <T1, T2, T3, rb_tree_tag, tree_order_statistics_node_update>;
template <class T1, class T2 = null_type, class T3 = hash <T1>> using pb_umap = gp_hash_table <T1, T2, T3>;
template <class T1, class T2, class T3 = hash <T1>> using umap = unordered_map <T1, T2, T3>;
template <class T> using uset = unordered_set <T>;
template <class T> using vec = vector <T>;

const ll infll = numeric_limits <ll>::max() >> 1;
const int inf = numeric_limits <int>::max() >> 1;
const double eps = 1e-6;
const int N = 1e5 + 1;
int n, m, k;

int all[N];
int cnt[N];

struct Graph {
    bool vis[N];
    bool bad[N];
    vec <int> adj[N];
} graph;

void input() {
    cin >> n >> m >> k;
    for(int i = 0; i < k; ++i) {
        int u; cin >> u;
        graph.bad[u] = 1;
    }
    for(int i = 0; i < m; ++i) {
        int u; cin >> u;
        int v; cin >> v;
        graph.adj[u].pb(v);
        graph.adj[v].pb(u);
    }
    for(int i = 1; i <= n; ++i) {
        all[i] = len(graph.adj[i]);
    }
}

int dfs(int u, double q) {
    graph.vis[u] = 1;
    int visited = 1;
    for(int v: graph.adj[u]) {
        if(graph.vis[v]) {
            continue;
        }
        if((double) --cnt[v] / len(graph.adj[v]) < q) {
            visited += dfs(v, q);
        }
    }
    return visited;
}

bool test(double q) {
    fill(graph.vis, graph.vis + n + 1, 0);
    copy(all, all + n + 1, cnt);
    int visited = 0;
    for(int i = 1; i <= n; ++i) {
        if(graph.bad[i] && !graph.vis[i]) {
            visited += dfs(i, q);
        }
    }
    if(visited == n) {
        return 0;
    } else {
        return 1;
    }
}

double bin_search(double l, double r) {
    if(r - l < eps) {
        return l;
    }
    double q = (l + r) / 2;
    if(test(q)) {
        return bin_search(q, r);
    } else {
        return bin_search(l, q);
    }
}

void visit(int u, double q) {
    graph.vis[u] = 1;
    for(int v: graph.adj[u]) {
        if(graph.vis[v]) {
            continue;
        }
        if((double) --cnt[v] / len(graph.adj[v]) < q) {
            visit(v, q);
        }
    }
}

void construct(double q) {
    fill(graph.vis, graph.vis + n + 1, 0);
    copy(all, all + n + 1, cnt);
    for(int i = 1; i <= n; ++i) {
        if(graph.bad[i] && !graph.vis[i]) {
            visit(i, q);
        }
    }
    vec <int> ans;
    for(int i = 1; i <= n; ++i) {
        if(!graph.vis[i]) {
            ans.pb(i);
        }
    }
    cout << len(ans) << "\n";
    for(int e: ans) {
        cout << e << " ";
    }
    cout << "\n";
}

void solve() {
    double q = bin_search(0, 1);
    construct(q);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    input();
    solve();
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/priority_queue.hpp>
//#pragma GCC optimize("O3")
//#pragma GCC target("sse4")
//#pragma GCC target("avx2")

#define deb(x) cout << #x << " = " << x << "\n"
#define all(x) (x).begin(), (x).end()
#define len(x) (int) x.size()
#define lsb(x) (x) & -(x)
#define l(x) (x << 1) + 1
#define r(x) (x << 1) + 2

#define xx first
#define yy second
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound

using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ld, ld> pld;
typedef pair <ll, ll> pll;

template <class T1, class T2 = less <T1>> using pb_heap = __gnu_pbds::priority_queue <T1, T2, binary_heap_tag>;
template <class T1, class T2 = null_type, class T3 = less <T1>> using pb_map = tree <T1, T2, T3, rb_tree_tag, tree_order_statistics_node_update>;
template <class T1, class T2 = null_type, class T3 = hash <T1>> using pb_umap = gp_hash_table <T1, T2, T3>;
template <class T1, class T2, class T3 = hash <T1>> using umap = unordered_map <T1, T2, T3>;
template <class T> using uset = unordered_set <T>;
template <class T> using vec = vector <T>;

const ll infll = numeric_limits <ll>::max() >> 1;
const int inf = numeric_limits <int>::max() >> 1;
const double eps = 1e-9;
const int N = 1e5 + 1;
int n, m, k;

int all[N];
int cnt[N];

struct Graph {
    bool vis[N];
    bool bad[N];
    vec <int> adj[N];
} graph;

void input() {
    cin >> n >> m >> k;
    for(int i = 0; i < k; ++i) {
        int u; cin >> u;
        graph.bad[u] = 1;
    }
    for(int i = 0; i < m; ++i) {
        int u; cin >> u;
        int v; cin >> v;
        graph.adj[u].pb(v);
        graph.adj[v].pb(u);
    }
    for(int i = 1; i <= n; ++i) {
        all[i] = len(graph.adj[i]);
    }
}

int dfs(int u, double q) {
    graph.vis[u] = 1;
    int visited = 1;
    for(int v: graph.adj[u]) {
        if(graph.vis[v]) {
            continue;
        }
        if((double) --cnt[v] / len(graph.adj[v]) < q) {
            visited += dfs(v, q);
        }
    }
    return visited;
}

bool test(double q) {
    fill(graph.vis, graph.vis + n + 1, 0);
    copy(all, all + n + 1, cnt);
    int visited = 0;
    for(int i = 1; i <= n; ++i) {
        if(graph.bad[i] && !graph.vis[i]) {
            visited += dfs(i, q);
        }
    }
    if(visited == n) {
        return 0;
    } else {
        return 1;
    }
}

double bin_search(double l, double r) {
    if(r - l < eps) {
        return l;
    }
    double q = (l + r) / 2;
    if(test(q)) {
        return bin_search(q, r);
    } else {
        return bin_search(l, q);
    }
}

void visit(int u, double q) {
    graph.vis[u] = 1;
    for(int v: graph.adj[u]) {
        if(graph.vis[v]) {
            continue;
        }
        if((double) --cnt[v] / len(graph.adj[v]) < q) {
            visit(v, q);
        }
    }
}

void construct(double q) {
    fill(graph.vis, graph.vis + n + 1, 0);
    copy(all, all + n + 1, cnt);
    for(int i = 1; i <= n; ++i) {
        if(graph.bad[i] && !graph.vis[i]) {
            visit(i, q);
        }
    }
    vec <int> ans;
    for(int i = 1; i <= n; ++i) {
        if(!graph.vis[i]) {
            ans.pb(i);
        }
    }
    cout << len(ans) << "\n";
    for(int e: ans) {
        cout << e << " ";
    }
    cout << "\n";
}

void solve() {
    double q = bin_search(0, 1);
    construct(q);
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    input();
    solve();
}


//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//typedef tree < int , null_type, less <int>, rb_tree_tag, tree_order_statistics_node_update> TREE;
#define ll long long int
#define ull unsigned long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define pii pair<int,int>
#define pss pair<short,short>
#define pld pair<long double,long double >
#define ld long double
#define piii  pair<pii,int>
#define vii vector<pair<int,int> >
#define st first
#define nd second
#define pll pair<ll,ll>
#define speed ios::sync_with_stdio(false);cin.tie();cout.tie();
#define M_PI 3.14159265358979323846
//#define int long long
const int mod=1000000007;
//const int mod=998244353;
const int inf=1000000009;
const long long INF=1000000000000000009;
const long long big=1000000000000000;
const long double eps=1e-9;
using namespace std;
int S[100005],F[100005],X[100005],D[100005];
double A[100005];
bool O[100005];
vi P[100005];
vi W;
int main()
{
    speed
    int n,m,k;
    cin>>n>>m>>k;
    for(int i=1; i<=k; i++)
    {
        int a;
        cin>>a;
        X[a]=1;
    }
    for(int i=1; i<=m; i++)
    {
        int a,b;
        cin>>a>>b;
        P[a].pb(b);
        P[b].pb(a);
        S[a]++,S[b]++;
        if(X[a])
            F[b]++;
        if(X[b])
            F[a]++;
    }
    set<pair<double,int> >M;
    double wynik=0;
    for(int i=1; i<=n; i++)
    {
        D[i]=F[i];
        double x=(double)(S[i]-F[i])/S[i];
        M.insert(mp(x,i));
        A[i]=x;
    }
    for(int i=1; i<=n; i++)
    {
        //cout<<i<<endl;
        auto it=M.begin();
        wynik=max(wynik,it->st);
        O[it->nd]=1;
        for(auto v:P[it->nd])
        {
            if(!O[v])
            {
                M.erase(M.find(mp(A[v],v)));
                F[v]++;
                double x=(double)(S[v]-F[v])/S[v];
                M.insert(mp(x,v));
                A[v]=x;
            }
        }
        M.erase(it);
    }
    // cout<<wynik<<endl;
    for(int i=1; i<=n; i++)
    {
        F[i]=D[i];
        double x=(double)(S[i]-F[i])/S[i];
        M.insert(mp(x,i));
        A[i]=x;
        O[i]=0;
    }
    for(int i=1; i<=n; i++)
    {
        //cout<<i<<endl;
        auto it=M.begin();
        if(wynik==it->st)
        {
            for(int j=1;j<=n;j++)
                if(!O[j])
                    W.pb(j);
            break;
        }
        O[it->nd]=1;
        for(auto v:P[it->nd])
        {
            if(!O[v])
            {
                M.erase(M.find(mp(A[v],v)));
                F[v]++;
                double x=(double)(S[v]-F[v])/S[v];
                M.insert(mp(x,v));
                A[v]=x;
            }
        }
        M.erase(it);
    }
    cout<<W.size()<<"\n";
    for(auto v:W)
        cout<<v<<" ";
    return 0;
}


//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//typedef tree < int , null_type, less <int>, rb_tree_tag, tree_order_statistics_node_update> TREE;
#define ll long long int
#define ull unsigned long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define pii pair<int,int>
#define pss pair<short,short>
#define pld pair<long double,long double >
#define ld long double
#define piii  pair<pii,int>
#define vii vector<pair<int,int> >
#define st first
#define nd second
#define pll pair<ll,ll>
#define speed ios::sync_with_stdio(false);cin.tie();cout.tie();
#define M_PI 3.14159265358979323846
//#define int long long
const int mod=1000000007;
//const int mod=998244353;
const int inf=1000000009;
const long long INF=1000000000000000009;
const long long big=1000000000000000;
const long double eps=1e-9;
using namespace std;
int S[100005],F[100005],X[100005],D[100005];
double A[100005];
bool O[100005];
vi P[100005];
vi W;
int main()
{
    speed
    int n,m,k;
    cin>>n>>m>>k;
    for(int i=1; i<=k; i++)
    {
        int a;
        cin>>a;
        X[a]=1;
    }
    for(int i=1; i<=m; i++)
    {
        int a,b;
        cin>>a>>b;
        P[a].pb(b);
        P[b].pb(a);
        S[a]++,S[b]++;
        if(X[a])
            F[b]++;
        if(X[b])
            F[a]++;
    }
    set<pair<double,int> >M;
    double wynik=0;
    for(int i=1; i<=n; i++)
    {
        if(X[i])
        {
             O[i]=1;
             continue;
        }
        D[i]=F[i];
        double x=(double)(S[i]-F[i])/S[i];
        M.insert(mp(x,i));
        A[i]=x;
    }
    for(int i=1; i<=n-k; i++)
    {
        //cout<<i<<endl;
        auto it=M.begin();
        wynik=max(wynik,it->st);
        O[it->nd]=1;
        for(auto v:P[it->nd])
        {
            if(!O[v])
            {
                M.erase(M.find(mp(A[v],v)));
                F[v]++;
                double x=(double)(S[v]-F[v])/S[v];
                M.insert(mp(x,v));
                A[v]=x;
            }
        }
        M.erase(it);
    }
    // cout<<wynik<<endl;
    for(int i=1; i<=n; i++)
    {
         O[i]=0;
        if(X[i])
        {
             O[i]=1;
             continue;
        }
        F[i]=D[i];
        double x=(double)(S[i]-F[i])/S[i];
        M.insert(mp(x,i));
        A[i]=x;

    }
    for(int i=1; i<=n-k; i++)
    {
        //cout<<i<<endl;
        auto it=M.begin();
        if(wynik==it->st)
        {
            for(int j=1;j<=n;j++)
                if(!O[j])
                    W.pb(j);
            break;
        }
        O[it->nd]=1;
        for(auto v:P[it->nd])
        {
            if(!O[v])
            {
                M.erase(M.find(mp(A[v],v)));
                F[v]++;
                double x=(double)(S[v]-F[v])/S[v];
                M.insert(mp(x,v));
                A[v]=x;
            }
        }
        M.erase(it);
    }
    cout<<W.size()<<"\n";
    for(auto v:W)
        cout<<v<<" ";
    return 0;
}


#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#ifdef on_linux
	#include <sys/resource.h>
#endif

#ifdef dobby_is_a_free_elf
	#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
	#define trace(...) 0;
#endif

using namespace std;
using namespace __gnu_pbds;

#define all(x)                  (x).begin(), (x).end()
#define between(i,x,y)          ((i) >= (x) && (i) <= (y))
#define DECIMAL(n)              cout << fixed << setprecision(n)
#define fi                      first
#define lbd                     lower_bound
#define mem0(x)                 memset(x, 0, sizeof (x))
#define mem1(x)                 memset(x, -1, sizeof (x))
#define mp                      make_pair
#define pb                      push_back
#define pf                      push_front
#define ppb                     pop_back
#define ppf                     pop_front
#define sc                      second
#define sqr(a)                  ((a) * (a))
#define sz(x)                   (int)((x).size())
#define ubd                     upper_bound

#define int                     long long

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template <typename T>
using ordered_set = tree<T, null_type,
      less<T>,
      rb_tree_tag,
      tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0
// order_of_key(k) returns count of elements strictly smaller than k

const long double PI = 3.14159265358979323846264338;
const double eps = 1e-10;
#ifdef int
	const long long INF = 1e18;
#else
	const long long INF = 1e9;
#endif
const int32_t fftmod = 998244353;
const int32_t MOD = 1000000007;
const int32_t N = 1e5 + 10;
const int32_t NN = 1e6 + 10;

int n, m, k;
vector<int> adj[N];
vector<int> fortress;

int same[N];
bool vis[N];

inline bool check(long double ratio) {

	for (int i = 1; i <= n; ++i) {
		same[i] = sz(adj[i]);
		vis[i] = 0;
	}

	queue<int> q;
	int cnt = 0;
	for (int i : fortress) {
		q.push(i);
		cnt++;
		same[i] = -1;
		vis[i] = true;
	}

	while (!q.empty()) {
		auto node = q.front();
		q.pop();
		for (int c : adj[node]) {
			if (!vis[c]) {
				same[c]--;
				if ((long double)same[c] / sz(adj[c]) < ratio) {
					vis[c] = 1;
					q.push(c);
					cnt++;
				}
			}
		}
	}
	return (cnt != n);
}

inline void elf_magic(int testcase)
{
	cin >> n >> m >> k;

	fortress.resize(k);
	for (int i = 0; i < k; ++i) {
		cin >> fortress[i];
	}

	for (int i = 0; i < m; ++i) {
		int u, v;
		cin >> u >> v;
		adj[u].pb(v);
		adj[v].pb(u);
	}

	int ctr = 50;
	long double hi = 1.0, lo = 0.0;
	while (ctr--) {
		long double mid = (hi + lo) / 2.0;
		if (check(mid)) { lo = mid; }
		else { hi = mid; }
	}

	check(lo);

	vector<int> ans;
	for (int i = 1; i <= n; ++i) {
		if ((long double)same[i] / sz(adj[i]) >= lo - eps) {
			ans.pb(i);
		}
	}

	cout << sz(ans) << '\n';

	for (int x : ans) {
		cout << x << ' ';
	}

	return;
}

int32_t main()
{
	#ifdef on_linux
	rlimit cpu_time {.rlim_cur = 2, .rlim_max = RLIM_INFINITY};
	setrlimit(RLIMIT_CPU, &cpu_time);
	#endif

	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int TESTS = 1;
	//cin >> TESTS;
	for (int i = 1; i <= TESTS; ++i) {
		// cout << "Case #" << i << ": ";
		elf_magic(i);
		if (i != TESTS)	{ cout << '\n'; }
	}
	return 0;
}


#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#ifdef on_linux
	#include <sys/resource.h>
#endif

#ifdef dobby_is_a_free_elf
	#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
	#define trace(...) 0;
#endif

using namespace std;
using namespace __gnu_pbds;

#define all(x)                  (x).begin(), (x).end()
#define between(i,x,y)          ((i) >= (x) && (i) <= (y))
#define DECIMAL(n)              cout << fixed << setprecision(n)
#define fi                      first
#define lbd                     lower_bound
#define mem0(x)                 memset(x, 0, sizeof (x))
#define mem1(x)                 memset(x, -1, sizeof (x))
#define mp                      make_pair
#define pb                      push_back
#define pf                      push_front
#define ppb                     pop_back
#define ppf                     pop_front
#define sc                      second
#define sqr(a)                  ((a) * (a))
#define sz(x)                   (int)((x).size())
#define ubd                     upper_bound

#define int                     long long

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template <typename T>
using ordered_set = tree<T, null_type,
      less<T>,
      rb_tree_tag,
      tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0
// order_of_key(k) returns count of elements strictly smaller than k

const long double PI = 3.14159265358979323846264338;
const double eps = 1e-10;
#ifdef int
	const long long INF = 1e18;
#else
	const long long INF = 1e9;
#endif
const int32_t fftmod = 998244353;
const int32_t MOD = 1000000007;
const int32_t N = 1e5 + 10;
const int32_t NN = 1e6 + 10;

int n, m, k;
vector<int> adj[N];
vector<int> fortress;

int same[N];
bool vis[N];

inline bool check(long double ratio) {

	for (int i = 1; i <= n; ++i) {
		same[i] = sz(adj[i]);
		vis[i] = 0;
	}

	queue<int> q;
	int cnt = 0;
	for (int i : fortress) {
		q.push(i);
		cnt++;
		same[i] = 0;
		vis[i] = true;
	}

	while (!q.empty()) {
		auto node = q.front();
		q.pop();
		for (int c : adj[node]) {
			if (!vis[c]) {
				same[c]--;
				if ((long double)same[c] / sz(adj[c]) < ratio) {
					vis[c] = 1;
					q.push(c);
					cnt++;
				}
			}
		}
	}
	return (cnt != n);
}

inline void elf_magic(int testcase)
{
	cin >> n >> m >> k;

	fortress.resize(k);
	for (int i = 0; i < k; ++i) {
		cin >> fortress[i];
	}

	for (int i = 0; i < m; ++i) {
		int u, v;
		cin >> u >> v;
		adj[u].pb(v);
		adj[v].pb(u);
	}

	int ctr = 50;
	long double hi = 1.0, lo = 0.0;
	while (ctr--) {
		long double mid = (hi + lo) / 2.0;
		if (check(mid)) { lo = mid; }
		else { hi = mid; }
	}

	check(lo);

	vector<int> ans;
	for (int i = 1; i <= n; ++i) {
		if ((long double)same[i] / sz(adj[i]) >= lo - eps) {
			ans.pb(i);
		}
	}

	cout << sz(ans) << '\n';

	for (int x : ans) {
		cout << x << ' ';
	}

	return;
}

int32_t main()
{
	#ifdef on_linux
	rlimit cpu_time {.rlim_cur = 2, .rlim_max = RLIM_INFINITY};
	setrlimit(RLIMIT_CPU, &cpu_time);
	#endif

	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int TESTS = 1;
	//cin >> TESTS;
	for (int i = 1; i <= TESTS; ++i) {
		// cout << "Case #" << i << ": ";
		elf_magic(i);
		if (i != TESTS)	{ cout << '\n'; }
	}
	return 0;
}


//Be Name Khoda, Besmellah Rahmane Rahim, In The Name Of God;
//#include<bits/stweight++.h>
#include<iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include<bitset>
#include<list>
#include<cassert>
#include<numeric>
#include <stdio.h>
#include <string.h>
#include<iomanip>
#include<unordered_map>
#include<unordered_set>
#include <fstream>

using namespace std;

const int N = 1e5 + 5;
vector <int> graph[N];
set < pair< long double, int> > s;
set< pair< long double, int> > city;
bool isBad[N];
int around[N];
int caround[N];
int call[N];
int all[N];
long double a[N];
long double b[N];
bool mark[N];
int n, m, k;
long double ans = 0;

int main()
{
    cin >> n >> m >> k;
    for (int i = 0; i < k; i++)
    {
        int tmp;
        cin >> tmp;
        tmp--;
        isBad[tmp] = true;
    }
    for (int i = 0; i < m; i++)
    {
        int u, v;
        cin >> u >> v;
        graph[u - 1].push_back(v - 1);
        graph[v - 1].push_back(u - 1);
    }
    for (int i = 0; i < n; i++)
    {
        int m1 = 0;
        int m2 = graph[i].size();
        for (auto nei: graph[i])
        {
            if (isBad[nei])
            {
                m1++;
            }
        }
        around[i] = m2 - m1;
        caround[i] = around[i];
        all[i] = m2;
        call[i] = all[i];
        m1 = m2 - m1;
        a[i] =  (long double) m1 / m2;
        b[i] = a[i];
        if (isBad[i])
        {
            continue;
        }
        s.insert({a[i], i});
        city.insert({a[i], i});
    }
    ans = (*s.begin()).first;
    int step = 0;
    int cnt = 0;
    while (s.size())
    {
        cnt++;
        int v = (*s.begin()).second;
        mark[v] = true;
        s.erase(s.begin());
        for (auto nei: graph[v])
        {
            s.erase({a[nei], nei});
            around[nei]--;
            a[nei] = (long double)around[nei] / all[nei];
            if (isBad[nei] || mark[nei])
            {
                continue;
            }
            s.insert({a[nei], nei});
        }
        if ((*s.begin()).first > ans)
        {
            step = cnt;
        }
        ans = max(ans, (*s.begin()).first);
    }
    cnt = 0;
    memset(mark, 0, sizeof mark);
    for (int i = 0; i < n; i++)
    {
        a[i] = b[i];
        all[i] = call[i];
        around[i] = caround[i];
    }
    while (city.size())
    {
        if (step == cnt)
        {
            break;
        }
        cnt++;
        int v = (*city.begin()).second;
        mark[v] = true;
        city.erase(city.begin());
        for (auto nei: graph[v])
        {
            city.erase({a[nei], nei});
            around[nei]--;
            a[nei] = (long double)around[nei] / all[nei];
            if (isBad[nei] || mark[nei])
            {
                continue;
            }
            city.insert({a[nei], nei});
        }
        ans = max(ans, (*city.begin()).first);
    }
    cout << city.size() << endl;
    for (auto nei: city)
    {
        cout << nei.second + 1 << " ";
    }

}