#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
const double eps = 1e-11;
const int oo = 1e9 + 7;
const long long mod = 1e9 + 7;
vector<int> g[MAX], mark[MAX], ver1[MAX];
int n, m;
int dfs(int node) {
  vector<int> adj, aux;
  for (int i = 0; i < g[node].size(); ++i) {
    if (mark[node][i] == 1) {
      mark[node][i] = 0;
      mark[g[node][i]][ver1[node][i]] = 0;
      adj.push_back(g[node][i]);
    }
  }
  int v;
  for (int i = 0; i < adj.size(); ++i) {
    v = dfs(adj[i]);
    if (v == 0) {
      aux.push_back(adj[i]);
    } else {
      printf("%d %d %d\n", v, adj[i], node);
    }
  }
  while (aux.size() >= 2) {
    int x, y;
    x = aux.back();
    aux.pop_back();
    y = aux.back();
    aux.pop_back();
    printf("%d %d %d\n", x, node, y);
  }
  if (aux.size() == 0)
    return 0;
  else
    return aux[0];
}
int main() {
  scanf("%d%d", &n, &m);
  int a, b;
  if (m % 2 != 0) {
    printf("No solution\n");
    return 0;
  }
  while (m--) {
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
    mark[a].push_back(1);
    mark[b].push_back(1);
    ver1[a].push_back(g[b].size() - 1);
    ver1[b].push_back(g[a].size() - 1);
  }
  dfs(1);
}
