#include <bits/stdc++.h>
using namespace std;
typedef int nod[100010];
typedef int edg[200010];
int n, m;
int e = 1;
nod h;
edg link, v, u;
nod vis;
nod fz;
int ju;
void creat(int x, int y) {
  link[++e] = h[x];
  h[x] = e;
  v[e] = y;
  link[++e] = h[y];
  h[y] = e;
  v[e] = x;
}
int dfs(int x) {
  if (vis[x])
    return 0;
  else
    vis[x] = 1;
  for (int i = h[x]; i; i = link[i])
    if (!u[i]) {
      u[i] = u[i ^ 1] = 1;
      if ((ju = dfs(v[i])))
        printf("%d %d %d\n", x, v[i], ju);
      else if (!fz[x])
        fz[x] = v[i];
      else
        printf("%d %d %d\n", fz[x], x, v[i]), fz[x] = 0;
    }
  return fz[x];
}
int main() {
  scanf("%d%d", &n, &m);
  if (m & 1) {
    printf("No solution\n");
    return 0;
  }
  for (int i = 1, x, y; i <= m; ++i) scanf("%d%d", &x, &y), creat(x, y);
  dfs(1);
  return 0;
}
