#include <bits/stdc++.h>
using namespace std;
const int MX = 100000 + 10;
vector<int> adj[MX];
set<int> ner[MX];
int n, m;
int def[MX], par[MX];
bool mark[MX];
void DFS(int v) {
  mark[v] = true;
  for (int i = 0; i < (int)adj[v].size(); i++)
    if (!mark[adj[v][i]]) {
      par[adj[v][i]] = v;
      DFS(adj[v][i]);
    }
  int u;
  bool uu = true;
  if ((int)ner[v].size() % 2 == 1) ner[v].erase(par[v]);
  for (set<int>::iterator it = ner[v].begin(); it != ner[v].end(); it++) {
    if (uu)
      u = *it;
    else {
      int q = *it;
      ner[q].erase(v);
      ner[u].erase(v);
      printf("%d %d %d\n", q, v, u);
    }
    uu = !uu;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0, u, v; i < m; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
    ner[u].insert(v);
    ner[v].insert(u);
  }
  if (m % 2) {
    printf("No solution\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (!mark[i]) DFS(i);
  }
  return 0;
}
