#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int n, m;
vector<int> adj[N];
int mark[N];
int dfs(int v, int p) {
  mark[v] = 1;
  vector<int> even;
  for (int i = 0; i <= (int)adj[v].size() - 1; ++i) {
    int u = adj[v][i];
    if (u == p) continue;
    if (mark[u] == 1)
      even.push_back(u);
    else if (!mark[u]) {
      int res = dfs(u, v);
      if (!res)
        even.push_back(u);
      else
        cout << v << ' ' << u << ' ' << res << '\n';
    }
  }
  while (even.size() > 1) {
    cout << even[even.size() - 1] << ' ' << v << ' ' << even[even.size() - 2]
         << '\n';
    even.pop_back();
    even.pop_back();
  }
  mark[v] = 2;
  if (even.size() == 1) return even[0];
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (m % 2 == 1)
    cout << "No solution\n";
  else
    dfs(1, 0);
  return 0;
}
