#include <bits/stdc++.h>
using namespace std;
int in() {
  int x;
  scanf("%d", &x);
  return x;
}
const int N = 1e5 + 100;
int n, m, h[N];
bool mark[N], is[N];
vector<int> adj[N];
void dfs(int v, int p = 0) {
  h[v] = h[p] + 1;
  vector<int> cur;
  mark[v] = true;
  for (auto u : adj[v]) {
    if (mark[u]) {
      if (u == p) continue;
      if (h[u] < h[v]) cur.push_back(u);
      continue;
    }
    dfs(u, v);
    if (is[u]) cur.push_back(u);
  }
  if (v != 0) cur.push_back(p);
  for (int i = 1; i < cur.size(); i += 2)
    printf("%d %d %d\n", cur[i - 1] + 1, v + 1, cur[i] + 1);
  is[v] = ((int)cur.size() % 2);
}
int main() {
  n = in(), m = in();
  for (int i = 0; i < m; i++) {
    int u = in() - 1, v = in() - 1;
    adj[u].push_back(v), adj[v].push_back(u);
  }
  if (m % 2) return cout << "No solution", 0;
  dfs(0);
}
