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:
/*
	Author: Arjan Singh Bal, IIIT Gwalior
	"Everything in this world is magic, except to the magician"
*/

#include						"bits/stdc++.h"
#ifdef LOCAL
#include						"pprint.hpp"
#else
#define trace 					//
#endif

using namespace std;

template <typename Arg1>
void prn(Arg1&& arg1)
{ cout << arg1 << "\n"; }
template <typename Arg1, typename... Args>
void prn(Arg1&& arg1, Args&&... args)
{ cout << arg1 << " "; prn(args...); }

template <typename Arg1>
void prs(Arg1&& arg1)
{ cout << arg1 << " ";}
template <typename Arg1, typename... Args>
void prs(Arg1&& arg1, Args&&... args)
{ cout << arg1 << " "; prs(args...); }

template <typename Arg1>
void read(Arg1&& arg1)
{ cin >> arg1; }
template <typename Arg1, typename... Args>
void read(Arg1&& arg1, Args&&... args)
{ cin >> arg1; read(args...); }

#define ll						long long
#define pii						pair<int, int>
#define pli						pair<ll, int>
#define pil						pair<int, ll>
#define pll						pair<ll, ll>
#define vi						vector<int>
#define vll						vector<ll>
#define vb						vector<bool>
#define vd						vector<double>
#define vs						vector<string>
#define ff						first
#define ss						second
#define pb						push_back
#define eb						emplace_back
#define ppb						pop_back
#define pf						push_front
#define ppf						pop_front
#define vpii					vector<pii>
#define umap					unordered_map
#define all(x)					x.begin(),x.end()
#define clr(a,b)				memset(a,b,sizeof a)
#define fr(i, n)				for (int i = 0; i < n; ++i)
#define fr1(i, n)				for (int i = 1; i <= n; ++i)
#define rfr(i, n)				for (int i = n - 1; i >= 0; --i)
#define precise(x)				cout << fixed << setprecision(x)
typedef double					f80;

inline void solve();

signed main()
{
#ifdef LOCAL
	freopen("in.txt" , "r" , stdin);
	//freopen("out.txt" , "w" , stdout);
#else	
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
#endif
	
	int t = 1;
	// read(t);
	fr1 (tc, t) {
		// cout << "Case #" << tc << ": ";
		solve();
	}
	return 0;
}

const int N = 3e3 + 1;

int n, m;

vector<pii> edges;
vector<bool> used;
vi ans;
vi adj[N];

void reset()
{
	ans.clear();
	used.assign(m, 0);
}

// returns other side of edge
int getOther(int id, int v) 
{
	return edges[id].ff ^ edges[id].ss ^ v;
}

// finds euler path ending at v
void dfs(int v) 
{
	for (auto id : adj[v]) {
		if (used[id]) continue;
		used[id] = 1;
		dfs(getOther(id, v));
		ans.pb(id);
	}
}

void checkEuler(int src)
{
	int oddCount = 0;
	for (int i = 1; i <= n; ++i) {
		bool parity = 0;
		for (auto j : adj[i]) {
			parity ^= !used[j];
		}
		if (parity && i != src) ++oddCount;
	}
	
	if (oddCount > 1) return ;
	dfs(src);
}

void fin(int src, vi &eulerTour, vi &star)
{
	trace(src, eulerTour, star);
	vi ans;
	int cur = src;
	reverse(all(eulerTour));
	ans.pb(cur);

	for (auto i : eulerTour) {
		cur = getOther(i, cur);
		ans.pb(cur);
	}

	reverse(all(ans));
	ans.pb(-1);

	for (auto i : star) {
		ans.pb(getOther(i, src));
		ans.pb(src);
	}

	prn(ans.size());

	for (auto i : ans) {
		prs(i);
	}

	exit(0);
}

inline void solve()
{
	read(n, m);

	fr (i, m) {
		int a, b;
		read(a, b);
		adj[a].pb(i);
		adj[b].pb(i);
		edges.eb(a, b);
	}


	// iterate on center of star
	fr1 (cen, n) {
		vi oddNeighbors;
		for (auto i : adj[cen]) {
			int x = getOther(i, cen);
			if (adj[x].size() & 1) oddNeighbors.pb(i);
		}
		reset();
		// make all odd neighbors even
		for (auto i : oddNeighbors) {
			used[i] = 1;
		}
		checkEuler(cen);
		if (ans.size() + oddNeighbors.size() == m) {
			fin(cen, ans, oddNeighbors);
		}
		// change all odd neighbors but one
		for (auto i : oddNeighbors) {
			vi tmp;
			reset();
			for (auto j : oddNeighbors) {
				if (j == i) continue;
				tmp.pb(j);
				used[j] = 1;
			}
			checkEuler(cen);
			if (ans.size() + tmp.size() == m) fin(cen, ans, tmp);
		}
	}

	prn(0);
}