#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000, maxm = 100000;
int visited[maxn + 1];
int adj[maxn + 1];
int N[2 * maxm];
int d[2 * maxm];
int dfs(int u, int p) {
  visited[u] = 1;
  int unmatched_child = -1;
  for (int i = adj[u]; i != -1; i = N[i]) {
    int v = d[i];
    if (v != p && visited[v] < 2) {
      int c = visited[v] == 1 ? -1 : dfs(v, u);
      if (c > 0)
        cout << c << " " << v << " " << u << endl;
      else if (unmatched_child > 0) {
        cout << unmatched_child << " " << u << " " << v << endl;
        unmatched_child = -1;
      } else
        unmatched_child = v;
    };
  };
  visited[u] = 2;
  return unmatched_child;
};
int main() {
  int n, m, u, v;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) visited[i] = 0, adj[i] = -1;
  for (int i = 0, j = 0; i < m; i++) {
    cin >> u >> v;
    N[j] = adj[u], adj[u] = j, d[j++] = v;
    N[j] = adj[v], adj[v] = j, d[j++] = u;
  }
  if (m % 2)
    cout << "No solution" << endl;
  else
    dfs(1, 0);
};
