Problem: You are given an undirected connected graph consisting of n vertices and m edges. Your goal is to destroy all edges of the given graph.

You may choose any vertex as the starting one and begin walking from it along the edges. When you walk along an edge, you destroy it. Obviously, you cannot walk along an edge if it is destroyed.

You can perform the mode shift operation at most once during your walk, and this operation can only be performed when you are at some vertex (you cannot perform it while traversing an edge). After the mode shift, the edges you go through are deleted in the following way: the first edge after the mode shift is not destroyed, the second one is destroyed, the third one is not destroyed, the fourth one is destroyed, and so on. You cannot switch back to the original mode, and you don't have to perform this operation if you don't want to.

Can you destroy all the edges of the given graph?

Input

The first line contains two integers n and m (2 ≤ n ≤ 3000; n - 1 ≤ m ≤ min((n(n-1))/(2), 3000)) — the numbef of vertices and the number of edges in the graph.

Then m lines follow, each containing two integers x_i and y_i (1 ≤ x_i, y_i ≤ n; x_i ≠ y_i) — the endpoints of the i-th edge. 

These edges form a connected undirected graph without multiple edges.

Output

If it's impossible to destroy all of the edges, print 0.

Otherwise, print the sequence of your actions as follows. First, print k — the number of actions (k ≤ 2m + 2). Then, print the sequence itself, consisting of k integers. The first integer should be the index of the starting vertex. Then, each of the next integers should be either the index of the next vertex in your traversal, or -1 if you use mode shift. You are allowed to use mode shift at most once.

If there are multiple answers, print any of them.

Examples

Input


3 3
1 2
2 3
3 1


Output


4
1 2 3 1


Input


4 3
1 2
2 3
4 2


Output


8
2 -1 1 2 3 2 4 2 


Input


5 5
1 2
2 3
3 1
2 4
2 5


Output


9
2 3 1 2 -1 4 2 5 2 


Input


5 5
1 2
2 3
3 1
2 4
4 5


Output


8
5 4 2 3 1 -1 2 1 


Input


6 5
1 2
2 3
3 4
4 5
3 6


Output


0

Solution (in CPP):

Solution:
#include<bits/stdc++.h>
using namespace std;
struct edge{
	int from,to,nxt;
}e[6005];
bool usd[6005],visit[3005];
int Head[3005],cnt=1,degree[3005],tmpdegree[3005],col[3005],colcnt,num[3005],pointcnt[3005];
void add(int x,int y){
	++cnt;
	e[cnt].from=x;
	e[cnt].to=y;
	e[cnt].nxt=Head[x];
	Head[x]=cnt;
}
int n,m;
stack<int>s;
int extraans[12005],extracnt,tmpans[12005],tmpcnt;
void init(){
	while(!s.empty())s.pop();
	memset(usd,0,sizeof(usd));
	memset(visit,0,sizeof(visit));
	memset(extraans,0,sizeof(extraans));
	memset(tmpans,0,sizeof(tmpans));
	memset(col,0,sizeof(col));
	memset(num,0,sizeof(num));
	memset(pointcnt,0,sizeof(pointcnt));
	extracnt=tmpcnt=colcnt=0;
	for(int i=1;i<=n;++i)tmpdegree[i]=degree[i];
}
void dfs(int now){
	visit[now]=true;
	for(int i=Head[now];i;i=e[i].nxt){
		if(usd[i])continue;
		usd[i]=usd[i^1]=true;
		dfs(e[i].to);
	}
	s.push(now);
}
void dfss(int now,int pre){
	col[now]=colcnt;
	++pointcnt[colcnt];
	for(int i=Head[now];i;i=e[i].nxt){
		int to=e[i].to;
		if(col[to]||to==pre)continue;
		dfss(to,now);
	}
}
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;++i){
		int x,y;
		scanf("%d%d",&x,&y);
		add(x,y);
		add(y,x);
		++degree[x];
		++degree[y];
	}
	int oddnum=0,start=1;
	for(int i=1;i<=n;++i)if(degree[i]%2)++oddnum,start=i;
	if(oddnum<=2){
		dfs(start);
		printf("%d\n",s.size());
		while(!s.empty()){
			printf("%d ",s.top());
			s.pop();
		}
		return !printf("\n");
	}
	for(int i=1;i<=n;++i){
		init();
		col[i]=colcnt=1;
		for(int j=Head[i];j;j=e[j].nxt){
			int to=e[j].to;
			if(!col[to]){
				++colcnt;
				dfss(to,i);
			}
			++num[col[to]];
		}
		for(int j=Head[i];j;j=e[j].nxt){
			if(pointcnt[col[e[j].to]]==1){
				usd[j]=usd[j^1]=true;
				extraans[++extracnt]=e[j].to;
				extraans[++extracnt]=i;
				--tmpdegree[i];
			}
			if(tmpdegree[e[j].to]%2){
				if(num[col[e[j].to]]==1)continue;
				--num[col[e[j].to]];
				--tmpdegree[e[j].to];
				--tmpdegree[i];
				usd[j]=usd[j^1]=true;
				extraans[++extracnt]=e[j].to;
				extraans[++extracnt]=i;
			}
		}
		oddnum=0;
		pointcnt[1]=19260817;
		for(int j=1;j<=n;++j)if(pointcnt[col[j]]>1&&tmpdegree[j]%2)++oddnum;
		if(oddnum==0||oddnum==2&&tmpdegree[i]%2){
			dfs(i);
			bool ky=true;
			for(int j=1;j<=n;++j){
				if(pointcnt[col[j]]>1&&tmpdegree[j]&&!visit[j]){
					ky=false;
					break;
				}
			}
			if(ky){
				while(!s.empty()){
					tmpans[++tmpcnt]=s.top();
					s.pop();
				}
				int tot=extracnt+tmpcnt;
				if(!tmpcnt)printf("%d\n%d ",tot+2,i);
				else printf("%d\n",tot+1);
				for(int j=tmpcnt;j>=1;--j)printf("%d ",tmpans[j]);
				printf("-1 ");
				for(int j=1;j<=extracnt;++j)printf("%d ",extraans[j]);
				return !printf("\n");
			}
		}
	}
	printf("0\n");
	return 0;
}