#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
int n, m;
vector<int> e[MAXN];
int marked[MAXN];
int dfs(int v, int p) {
  marked[v] = true;
  vector<int> k;
  for (int i = 0; i < e[v].size(); i++) {
    int u = e[v][i];
    if (u == p) continue;
    if (marked[u] == true)
      k.push_back(u);
    else if (!marked[u]) {
      int l = dfs(u, v);
      if (l == 0)
        k.push_back(u);
      else
        cout << v << " " << u << " " << l << endl;
    }
  }
  while (k.size() > 1) {
    cout << k[k.size() - 1] << " " << v << " " << k[k.size() - 2] << endl;
    k.pop_back();
    k.pop_back();
  }
  marked[v] = 2;
  if (k.size() == 1) return k[0];
  return 0;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  if (m % 2 == 1)
    cout << "No solution" << endl;
  else
    dfs(1, 0);
  return 0;
}
