#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct node {
  int x, y, z;
  node(int x, int y, int z) : x(x), y(y), z(z) {}
};
vector<int> adj[N];
vector<node> ans;
int vis[N];
int tot;
int dfs(int u, int fa) {
  vis[u] = ++tot;
  int a = 0;
  int s = adj[u].size();
  for (int i = 0; i < s; i++) {
    int v = adj[u][i];
    if (v == fa) continue;
    if (!vis[v]) {
      if (dfs(v, u)) continue;
      if (!a)
        a = v;
      else {
        ans.push_back(node(v, u, a));
        a = 0;
      }
    } else if (vis[v] < vis[u]) {
      if (!a)
        a = v;
      else {
        ans.push_back(node(v, u, a));
        a = 0;
      }
    }
  }
  if (a) {
    ans.push_back(node(a, u, fa));
    return 1;
  }
  return 0;
}
int main() {
  int n, m, u, v, i, j;
  while (~scanf("%d%d", &n, &m)) {
    for (i = 0; i < m; i++) {
      scanf("%d%d", &u, &v);
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
    if (m & 1) {
      printf("No solution\n");
      continue;
    }
    tot = 0;
    dfs(1, -1);
    int k = ans.size();
    for (i = 0; i < k; i++) {
      node tmp = ans[i];
      printf("%d %d %d\n", tmp.x, tmp.y, tmp.z);
    }
  }
  return 0;
}
