#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int maxlog = 22;
const long long mod = 1e9 + 7;
const int sq = 340;
const int inf = 1e9 + 43;
const long double pi = 3.14159265;
vector<int> adj[maxn];
int id[maxn], depth[maxn];
bool mark[maxn];
struct S {
  int x, y, z;
};
vector<S> ans;
void dfs(int v) {
  mark[v] = true;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i];
    if (mark[u]) continue;
    depth[u] = depth[v] + 1;
    dfs(u);
  }
  vector<int> vec;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i];
    if (depth[u] > depth[v]) {
      if (id[u]) {
        ans.push_back({v, u, id[u]});
        id[u] = 0;
      } else {
        vec.push_back(u);
      }
    }
  }
  if (vec.size() % 2 == 1) {
    int u = vec.back();
    id[v] = u;
    vec.pop_back();
  }
  for (int i = 0; i < vec.size(); i += 2) {
    int u = vec[i];
    int w = vec[i + 1];
    ans.push_back({u, v, w});
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  if (m & 1) {
    cout << "No solution";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (!mark[i]) {
      dfs(i);
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].x << " " << ans[i].y << " " << ans[i].z << endl;
  }
  return 0;
}
