#include <bits/stdc++.h>
using namespace std;
int vis[100005], tin[100005], timer = 1;
vector<pair<pair<int, int>, int>> res;
void dfs(int i, int p, vector<vector<int>> &v) {
  vis[i] = 1;
  tin[i] = timer++;
  vector<int> edg;
  for (int j = 0; j < int(v[i].size()); j++)
    if (!vis[v[i][j]]) {
      dfs(v[i][j], i, v);
      if (vis[v[i][j]] == 1) edg.push_back(v[i][j]);
    } else if (v[i][j] != p && tin[v[i][j]] > tin[i])
      edg.push_back(v[i][j]);
  for (int j = 1; j < int(edg.size()); j += 2)
    res.push_back({{edg[j], i}, edg[j - 1]});
  if (p && int(edg.size()) % 2 == 1) {
    res.push_back({{p, i}, edg.back()});
    vis[i] = 2;
  }
}
void solve() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m % 2) {
    cout << "No solution";
    exit(0);
  }
  vector<vector<int>> v(n + 1);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(1, 0, v);
  for (int i = 0; i < m / 2; i++)
    printf("%d %d %d\n", res[i].first.first, res[i].first.second,
           res[i].second);
}
int main() {
  int qc = 1;
  for (int i = 1; i <= qc; i++) solve();
}
