#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> E;
vector<vector<int>> inc, adj;
vector<bool> mark, emark;
const int inf = 1e5 + 10;
vector<int> f;
void dfs(int v, int p = -1, int pe = -1) {
  mark[v] = true;
  int q = inf;
  for (auto e : inc[v]) {
    int u = v ^ E[e].first ^ E[e].second;
    if (!mark[u] && !emark[e]) {
      dfs(u, v, e);
      if (f[u] != -1 && !emark[f[u]]) {
        if (q == inf)
          q = f[u];
        else {
          int y = v ^ E[q].first ^ E[q].second;
          cout << u + 1 << ' ' << v + 1 << ' ' << y + 1 << '\n';
          emark[f[u]] = true;
          emark[q] = true;
          q = inf;
        }
      }
    } else if (mark[u] && u != p && !(emark[e])) {
      if (q == inf)
        q = e;
      else {
        cout << u + 1 << ' ' << v + 1 << ' ';
        emark[e] = true;
        emark[q] = true;
        if (E[q].first == v)
          cout << E[q].second + 1;
        else
          cout << E[q].first + 1;
        cout << '\n';
        q = inf;
      }
    }
  }
  if (q != inf && p != -1 && !emark[pe]) {
    int y = v ^ E[q].first ^ E[q].second;
    cout << p + 1 << ' ' << v + 1 << ' ' << y + 1 << '\n';
    emark[pe] = true;
    emark[q] = true;
  } else if (p != -1) {
    f[v] = pe;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  inc.resize(n);
  adj.resize(n);
  mark.resize(n);
  emark.resize(m);
  E.resize(m);
  f.resize(n, -1);
  for (int i = 0; i < m; i++) {
    int v, u;
    cin >> v >> u;
    v--;
    u--;
    E[i] = {v, u};
    inc[v].push_back(i);
    inc[u].push_back(i);
    adj[v].push_back(u);
    adj[u].push_back(v);
  }
  if (m % 2) {
    cout << "No solution";
    return 0;
  }
  dfs(0);
}
