Problem: Little Chris is participating in a graph cutting contest. He's a pro. The time has come to test his skills to the fullest.

Chris is given a simple undirected connected graph with n vertices (numbered from 1 to n) and m edges. The problem is to cut it into edge-distinct paths of length 2. Formally, Chris has to partition all edges of the graph into pairs in such a way that the edges in a single pair are adjacent and each edge must be contained in exactly one pair.

For example, the figure shows a way Chris can cut a graph. The first sample test contains the description of this graph.

<image>

You are given a chance to compete with Chris. Find a way to cut the given graph or determine that it is impossible!

Input

The first line of input contains two space-separated integers n and m (1 ≤ n, m ≤ 105), the number of vertices and the number of edges in the graph. The next m lines contain the description of the graph's edges. The i-th line contains two space-separated integers ai and bi (1 ≤ ai, bi ≤ n; ai ≠ bi), the numbers of the vertices connected by the i-th edge. It is guaranteed that the given graph is simple (without self-loops and multi-edges) and connected.

Note: since the size of the input and output could be very large, don't use slow output techniques in your language. For example, do not use input and output streams (cin, cout) in C++.

Output

If it is possible to cut the given graph into edge-distinct paths of length 2, output <image> lines. In the i-th line print three space-separated integers xi, yi and zi, the description of the i-th path. The graph should contain this path, i.e., the graph should contain edges (xi, yi) and (yi, zi). Each edge should appear in exactly one path of length 2. If there are multiple solutions, output any of them.

If it is impossible to cut the given graph, print "No solution" (without quotes).

Examples

Input

8 12
1 2
2 3
3 4
4 1
1 3
2 4
3 5
3 6
5 6
6 7
6 8
7 8


Output

1 2 4
1 3 2
1 4 3
5 3 6
5 6 8
6 7 8

Input

3 3
1 2
2 3
3 1


Output

No solution


Input

3 2
1 2
2 3


Output

1 2 3

Solution (in JAVA):

Solution:
import static java.util.Arrays.*;

import java.text.*;
import java.util.*;

public class C {

	public C () {
		int N = sc.nextInt();
		int M = sc.nextInt();
		if (M % 2 == 1) {
			print("No solution");
			exit();
		}

		Integer [][] E = sc.nextInts(M);

		boolean [] T = new boolean [M];
		int [] D = new int [N];

		Integer [] C = singletons(N);
		for (int i : rep(M)) {
			Integer [] e = E[i];
			--e[0]; --e[1];
			int u = root(C, e[0]), v = root(C, e[1]);
			if (u != v) {
				T[i] = true;
				++D[e[0]]; ++D[e[1]];
				C[u] = C[v];
			}
		}

		int [] P = new int [N]; fill (P, -1);
		List<Integer []> LF = new ArrayList<>();
		for (int i : rep(M))
			if (T[i])
				LF.add(E[i]);
			else {
				int u = E[i][0], v = E[i][1];
				if (P[u] >= 0) {
					print(P[u]+1, u+1, v+1);
					P[u] = P[P[u]] = -1;
				} else if (P[v] >= 0) {
					print(P[v]+1, v+1, u+1);
					P[v] = P[P[v]] = -1;
				} else {
					P[u] = v; P[v] = u;
				}
			}

		Integer [][] F = LF.toArray(new Integer [0][]);
		int [][] G = graph(N, F);
		@SuppressWarnings("unchecked")
		TreeSet<Integer> [] SG = new TreeSet[N];
		for (int i : rep(N)) {
			SG[i] = new TreeSet<>();
			for (int j : G[i])
				SG[i].add(j);
		}

		Queue<Integer> L = new LinkedList<>();
		for (int i : rep(N))
			if (D[i] == 1)
				L.add(i);

		while (!L.isEmpty()) {
			int u = L.poll();
			if (SG[u].isEmpty())
				continue;
			int v = SG[u].first();
			SG[v].remove(u);
			if(--D[v] == 1)
				L.add(v);
			if (P[u] >= 0) {
				print(P[u]+1, u+1, v+1);
				P[u] = P[P[u]] = -1;
			} else if (P[v] >= 0) {
				print(P[v]+1, v+1, u+1);
				P[v] = P[P[v]] = -1;
			} else {
				P[u] = v; P[v] = u;
			}
		}
	}

	private static long ceil (long p, long q) {
		if (q < 0) return ceil(-p, -q);
		else if (p < 0) return -floor(-p, q);
		else return (p+q-1) / q;
	}
	private static long floor(long p, long q) {
		if (q < 0) return floor(-p, -q);
		else if (p < 0) return -ceil(-p, q);
		else return p / q;
	}
	private static int [][] graph (int N, Integer [][] E) { return lgraph(N, E)[0]; }
	private static int [][][] lgraph(int N, Integer [][] E) {
		int [] D = new int [N];
		for (Integer [] e : E) {
			int x = e[0], y = e[1];
			++D[x]; ++D[y];
		}
		int [][][] res = new int [2][N][];
		for (int i = 0; i < 2; ++i)
			for (int j = 0; j < N; ++j)
				res[i][j] = new int [D[j]];
		D = new int [N];
		for (Integer [] e : E) {
			int x = e[0], y = e[1], z = e.length > 2 ? e[2] : 1;
			res[0][x][D[x]] = y; res[0][y][D[y]] = x;
			res[1][x][D[x]] = res[1][y][D[y]] = z;
			++D[x]; ++D[y];
		}
		return res;
	}
	private static int [] rep(int N) { return rep(0, N); }
	private static int [] rep(int S, int T) { if (T <= S) return new int [0]; int [] res = new int [T-S]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	private static int root (Integer [] C, int s) {
		int res = s;
		while (C[res] != res)
			res = C[res];
		int v = s;
		while (v != res) {
			v = C[v];
			C[v] = res;
		}
		return C[s] = res;
	}
	private static Integer [] singletons(int N) {
		Integer [] res = new Integer [N];
		for (int i = 0; i < N; ++i)
			res[i] = i;
		return res;
	}
	////////////////////////////////////////////////////////////////////////////////////
	private final static IOUtils.MyScanner sc = new IOUtils.MyScanner();
	private static void print (Object o, Object ...a) { IOUtils.print(o, a); }
	private static void exit() { IOUtils.exit(); }
	private static class IOUtils {
		public static class MyScanner {
			public String next() { newLine(); return line[index++]; }
			public int nextInt() { return Integer.parseInt(next()); }
			public String nextLine() { line = null; return readLine(); }
			public String [] nextStrings() { return split(nextLine()); }
			public Integer [] nextInts() {
				String [] L = nextStrings();
				Integer [] res = new Integer [L.length];
				for (int i = 0; i < L.length; ++i)
					res[i] = Integer.parseInt(L[i]);
				return res;
			}
			public Integer [][] nextInts (int N) {
				Integer [][] res = new Integer [N][];
				for (int i = 0; i < N; ++i)
					res[i] = nextInts();
				return res;
			}
			//////////////////////////////////////////////
			private boolean eol() { return index == line.length; }
			private String readLine() {
				try {
					return r.readLine();
				} catch (Exception e) {
					throw new Error (e);
				}
			}
			private final java.io.BufferedReader r;
			private MyScanner () { this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in))); }
			private MyScanner (java.io.BufferedReader r) {
				try {
					this.r = r;
					while (!r.ready())
						Thread.sleep(1);
					start();
				} catch (Exception e) {
					throw new Error(e);
				}
			}
			private String [] line;
			private int index;
			private void newLine() {
				if (line == null || eol()) {
					line = split(readLine());
					index = 0;
				}
			}
			private String [] split(String s) { return s.length() > 0 ? s.split(" ") : new String [0]; }
		}
		private static String build(Object o, Object... a) { return buildDelim(" ", o, a); }
		private static String buildDelim(String delim, Object o, Object... a) {
			StringBuilder b = new StringBuilder();
			append(b, o, delim);
			for (Object p : a)
				append(b, p, delim);
			return b.substring(delim.length());
		}
		//////////////////////////////////////////////////////////////////////////////////
		private static void start() { if (t == 0) t = millis(); }
		private static void append(StringBuilder b, Object o, String delim) {
			if (o.getClass().isArray()) {
				int len = java.lang.reflect.Array.getLength(o);
				for (int i = 0; i < len; ++i)
					append(b, java.lang.reflect.Array.get(o, i), delim);
			} else if (o instanceof Iterable<?>)
				for (Object p : (Iterable<?>) o)
					append(b, p, delim);
			else {
				if (o instanceof Double)
					o = new DecimalFormat("#.############").format(o);
				b.append(delim).append(o);
			}
		}
		private static java.io.PrintWriter pw = new java.io.PrintWriter(System.out);
		private static void print(Object o, Object ...a) { pw.println(build(o, a)); }
		private static void err(Object o, Object ...a) { System.err.println(build(o, a)); }
		private static void exit() {
			IOUtils.pw.close();
			System.out.flush();
			err("------------------");
			err(IOUtils.time());
			System.exit(0);
		}
		private static long t;
		private static long millis() { return System.currentTimeMillis(); }
		private static String time() { return "Time: " + (millis() - t) / 1000.0; }
	}
	public static void main (String[] args) { new C(); exit(); }
}