#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<int> vis;
vector<pair<int, pair<int, int>>> ans;
pair<int, int> edge(int a, int b) { return make_pair(min(a, b), max(a, b)); }
void tl() {
  int i = 0;
  while (true) {
    --i, ++i;
  }
}
bool cut(int v, int p) {
  vis[v] = 1;
  vector<int> need_pair;
  for (int i = 0; i < g[v].size(); i++) {
    if (g[v][i] == p) continue;
    if (!vis[g[v][i]]) {
      if (!cut(g[v][i], v)) need_pair.push_back(g[v][i]);
    } else if (vis[g[v][i]] == 1) {
      need_pair.push_back(g[v][i]);
    }
  }
  while (need_pair.size() >= 2) {
    int w = need_pair[need_pair.size() - 1];
    need_pair.pop_back();
    int t = need_pair[need_pair.size() - 1];
    need_pair.pop_back();
    cout << w + 1 << " " << v + 1 << " " << t + 1 << "\n";
  }
  vis[v] = 2;
  if (need_pair.size() == 0) return false;
  cout << p + 1 << " " << v + 1 << " " << need_pair[0] + 1 << "\n";
  return true;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  g.resize(n);
  vis.assign(n, 0);
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  if (m % 2 != 0)
    cout << "No solution";
  else
    cut(0, -1);
  return 0;
}
