#include <bits/stdc++.h>
using namespace std;
long long n, m, mark[200005];
vector<long long> g[200005];
vector<pair<pair<long long, long long>, long long> > ans;
long long dfs(long long st, long long pr = -1) {
  mark[st] = 1;
  long long ct = 0;
  vector<long long> ext;
  for (long long v : g[st]) {
    if (!mark[v]) {
      long long tt = ct;
      ct += dfs(v, st);
      if (ct > tt) ext.push_back(v);
    } else if (mark[v] == 2) {
      ct++;
      ext.push_back(v);
    }
  }
  mark[st] = 2;
  long long ret = 1;
  if (ct % 2 && pr != -1) {
    ext.push_back(pr);
    ret = 0;
  }
  for (int i = 0; i + 1 < ext.size(); i += 2) {
    ans.push_back(make_pair(make_pair(ext[i], st), ext[i + 1]));
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (long long i = 1; i <= m; ++i) {
    long long u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (long long i = 1; i <= n; ++i)
    if (!mark[i]) dfs(i);
  if (m & 1)
    cout << "No solution\n";
  else
    for (auto xp : ans)
      cout << xp.first.first << " " << xp.first.second << " " << xp.second
           << '\n';
}
