#include <bits/stdc++.h>
using namespace std;
int n, m, ta, tb;
vector<vector<int> > x;
vector<int> em;
vector<bool> vis;
int dfs(int v) {
  vis[v] = true;
  vector<int> adj, unpair;
  for (int a = 0; a < x[v].size(); a++)
    if (!vis[x[v][a]]) adj.push_back(x[v][a]);
  for (int a = 0; a < adj.size(); a++) {
    int w = dfs(adj[a]);
    if (w == 0)
      unpair.push_back(adj[a]);
    else
      printf("%d %d %d\n", v + 1, adj[a] + 1, w + 1);
  }
  while (unpair.size() >= 2) {
    printf("%d %d %d\n", unpair[unpair.size() - 1] + 1, v + 1,
           unpair[unpair.size() - 2] + 1);
    unpair.pop_back();
    unpair.pop_back();
  }
  if (unpair.size() > 0) return unpair[0];
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int a = 0; a < n; a++) {
    x.push_back(em);
    vis.push_back(false);
  }
  for (int a = 0; a < m; a++) {
    scanf("%d%d", &ta, &tb);
    ta--, tb--;
    x[ta].push_back(tb);
    x[tb].push_back(ta);
  }
  if (m % 2 != 0) {
    printf("No solution\n");
    return 0;
  }
  dfs(0);
  return 0;
}
