#include <bits/stdc++.h>
using namespace std;
class TaskE {
  int n, m;
  vector<tuple<int, int, int>> res;
  vector<set<int>> adj;
  int dfs(int u) {
    vector<int> unpaired;
    while (!adj[u].empty()) {
      int v = *adj[u].begin();
      adj[u].erase(v);
      adj[v].erase(u);
      int w = dfs(v);
      if (w == -1) {
        unpaired.emplace_back(v);
      } else {
        res.emplace_back(u, v, w);
      }
    }
    for (int i = (unpaired.size() & 1); i < unpaired.size(); i += 2) {
      res.emplace_back(unpaired[i], u, unpaired[i + 1]);
    }
    if (unpaired.size() & 1) {
      return unpaired[0];
    }
    return -1;
  }

 public:
  TaskE(int n, int m) {
    this->n = n;
    this->m = m;
    adj.resize(n);
    for (int i = 0; i < m; i++) {
      int u, v;
      cin >> u >> v;
      u--, v--;
      adj[u].insert(v);
      adj[v].insert(u);
    }
  }
  void solve() {
    if (m & 1) {
      cout << "No solution\n";
      return;
    }
    dfs(0);
    for (int i = 0; i < res.size(); i++) {
      int u, v, w;
      tie(u, v, w) = res[i];
      u++, v++, w++;
      cout << u << ' ' << v << ' ' << w << '\n';
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  TaskE E(n, m);
  E.solve();
}
