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 <stdio.h>
#include <stdlib.h>
#include <string.h>

#define N	3000
#define M	3000

int ii[M], jj[M]; char used[M];
int* eh[N], eo[N];

void append(int i, int h) {
	int o = eo[i]++;

	if (o >= 2 && (o & o - 1) == 0)
		eh[i] = (int*)realloc(eh[i], o * 2 * sizeof * eh[i]);
	eh[i][o] = h;
}

int ds[N];

int find(int i) {
	return ds[i] < 0 ? i : (ds[i] = find(ds[i]));
}

void join(int i, int j) {
	i = find(i);
	j = find(j);
	if (i == j)
		return;
	if (ds[i] > ds[j])
		ds[i] = j;
	else {
		if (ds[i] == ds[j])
			ds[i]--;
		ds[j] = i;
	}
}

int qu[M * 2 + 2], cnt;

void dfs(int i) {
	while (eo[i]) {
		int h = eh[i][--eo[i]];

		if (!used[h]) {
			used[h] = 1, dfs(i ^ ii[h] ^ jj[h]);
			qu[cnt++] = i;
		}
	}
}

int main() {
	static int dd[N];
	int n, m, h, i, j;

	scanf("%d%d", &n, &m);
	for (i = 0; i < n; i++)
		eh[i] = (int*)malloc(2 * sizeof * eh[i]);
	for (h = 0; h < m; h++) {
		scanf("%d%d", &i, &j), i--, j--;
		ii[h] = i, jj[h] = j;
		append(i, h), append(j, h);
	}
	for (i = 0; i < n; i++) {
		int j_, k;

		memset(ds, -1, n * sizeof * ds);
		memset(used, 2, m * sizeof * used);
		memset(dd, 0, n * sizeof * dd);
		for (h = 0; h < m; h++)
			if (ii[h] != i && jj[h] != i)
				dd[ii[h]]++, dd[jj[h]]++, used[h] = 0, join(ii[h], jj[h]);
		for (h = 0; h < m; h++)
			if (ii[h] == i || jj[h] == i) {
				j = i ^ ii[h] ^ jj[h];
				if (dd[j] % 2 == 1)
					dd[ii[h]]++, dd[jj[h]]++, used[h] = 0, join(ii[h], jj[h]);
			}
		for (h = 0; h < m; h++)
			if (ii[h] == i || jj[h] == i) {
				j = i ^ ii[h] ^ jj[h];
				if (dd[j] != 0 && find(j) != find(i))
					dd[ii[h]]++, dd[jj[h]]++, used[h] = 0, join(ii[h], jj[h]);
			}
		j_ = i, k = 0;
		for (j = 0; j < n; j++)
			if (j != i && dd[j] % 2 != 0)
				j_ = j, k++;
		if (k <= 1) {
			qu[cnt++] = j_;
			dfs(i);
			qu[cnt++] = -2;
			for (h = 0; h < m; h++)
				if (used[h] == 2) {
					j = i ^ ii[h] ^ jj[h];
					qu[cnt++] = j, qu[cnt++] = i;
				}
			printf("%d\n", cnt);
			for (h = 0; h < cnt; h++)
				printf("%d ", qu[h] + 1);
			printf("\n");
			return 0;
		}
	}
	printf("0\n");
	return 0;
}