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 CPP):

Solution:
#include <bits/stdc++.h>
class graph {
 public:
  int node[400200], next[400200], to[400200];
  int e, n;
  void ins(int x, int y) {
    e++;
    next[e] = node[x];
    node[x] = e;
    to[e] = y;
  }
};
class tree {
 public:
  int dsu[400200];
  int find(int x) { return (dsu[x] == x) ? x : dsu[x] = find(dsu[x]); }
  graph T;
  int col[400200], ned[400200];
  int red[400200][2], rcn, n;
  void gen(graph &G) {
    int i, j, k = 0;
    n = T.n = G.n;
    for (i = 1; i <= n; i++) dsu[i] = i;
    for (i = 1; i <= n; i++)
      for (j = G.node[i]; j; j = G.next[j])
        if (find(i) != find(G.to[j])) {
          dsu[dsu[i]] = dsu[G.to[j]];
          T.ins(i, G.to[j]);
          T.ins(G.to[j], i);
        } else
          red[++rcn][0] = i, red[rcn][1] = G.to[j];
    for (i = 1; i <= n; i++) ned[i] = 0;
    for (i = 1; i <= rcn; i++) ned[red[i][0]] ^= 1;
  }
  int dep[400200], siz[400200], tp[400200], dp[400200], pfc[400200],
      par[400200], boj[400200], ind[400200], rid[400200], cao[400200];
  int id;
  void dfs1(int x, int p) {
    int j;
    siz[x] = 1;
    for (j = T.node[x]; j; j = T.next[j])
      if (T.to[j] != p) {
        dep[T.to[j]] = dep[x] + 1;
        par[T.to[j]] = x;
        dfs1(T.to[j], x);
        siz[x] += siz[T.to[j]];
        if (siz[T.to[j]] > siz[pfc[x]]) pfc[x] = T.to[j];
        ned[x] ^= 1;
      }
  }
  void dfs2(int x, int p) {
    int j;
    if (pfc[x]) {
      ind[pfc[x]] = ++id;
      rid[id] = pfc[x];
      tp[pfc[x]] = tp[x];
      dp[pfc[x]] = dp[x] + 1;
      dfs2(pfc[x], x);
    }
    for (j = T.node[x]; j; j = T.next[j])
      if (T.to[j] != p && T.to[j] != pfc[x]) {
        ind[T.to[j]] = ++id;
        rid[id] = T.to[j];
        tp[T.to[j]] = T.to[j];
        dp[T.to[j]] = 1;
        dfs2(T.to[j], x);
      }
  }
  void paint(int x, int y) {
    while (tp[x] != tp[y]) {
      if (dep[tp[x]] >= dep[tp[y]]) {
        boj[ind[x]] ^= 1;
        boj[ind[tp[x]]] ^= 1;
        cao[ind[tp[x]]] ^= 1;
        x = par[tp[x]];
      } else {
        x ^= y;
        y ^= x;
        x ^= y;
      }
    }
    boj[ind[x]] ^= 1;
    boj[ind[y]] ^= 1;
  }
  graph O;
  int fuck[400200];
  bool doit() {
    int i, j, k;
    for (i = 1; i <= n; i++) O.ins(find(i), i);
    for (i = 1; i <= n; i++)
      if (find(i) == i) {
        dfs1(i, 0);
        tp[i] = i;
        dp[i] = 0;
        ind[i] = ++id;
        rid[id] = i;
        dfs2(i, 0);
      }
    for (i = 1; i <= n; i++) {
      k = 0;
      for (j = O.node[i]; j; j = O.next[j])
        if (ned[O.to[j]]) fuck[++k] = O.to[j];
      if (k & 1) return 0;
      for (j = 1; j <= k; j += 2) paint(fuck[j], fuck[j + 1]);
    }
    k = 0;
    for (i = 1; i <= n; i++) {
      cao[i] ^= k;
      k ^= boj[i];
    }
    return 1;
  }
  void print(graph &G) {
    int i, j, k;
    for (i = 1; i <= rcn; i++) G.ins(red[i][0], red[i][1]);
    for (i = 1; i <= n; i++)
      for (j = T.node[i]; j; j = T.next[j])
        if (par[T.to[j]] == i) {
          if (cao[ind[T.to[j]]])
            G.ins(T.to[j], i);
          else
            G.ins(i, T.to[j]);
        }
  }
} T;
int E[400200][2];
graph res, ori;
int n, m;
void init() {
  int i, j, u, v;
  scanf("%d %d\n", &n, &m);
  for (i = 1; i <= m; i++) {
    scanf("%d %d\n", &u, &v);
    ori.ins(u, v);
  }
  ori.n = n;
  T.gen(ori);
}
int go[400200];
int main() {
  int i, j;
  init();
  if (!T.doit()) {
    printf("No solution");
    return 0;
  }
  T.print(res);
  for (i = 1; i <= n; i++)
    for (j = res.node[i]; j; j = res.next[res.next[j]])
      printf("%d %d %d\n", res.to[j], i, res.to[res.next[j]]);
  return 0;
}