#include <bits/stdc++.h>
using namespace std;
vector<int> G[105000];
bool vis[105000];
int mark[105000];
int sta[105000], top;
void dfs(int u, int fa) {
  vis[u] = true;
  int sz = G[u].size();
  for (int i = 0; i < sz; i++) {
    int v = G[u][i];
    if (!vis[v] && v != fa) dfs(v, u);
  }
  top = 0;
  for (int i = 0; i < sz; i++) {
    int v = G[u][i];
    if (v != fa && mark[v] != 1) sta[top++] = v;
  }
  if (top & 1)
    sta[top++] = fa, mark[u] = 1;
  else
    mark[u] = 2;
  for (int i = 0; i < top; i += 2) {
    printf("%d %d %d\n", sta[i], u, sta[i + 1]);
    if (mark[sta[i]] == 2) mark[sta[i]] = 1;
    if (mark[sta[i + 1]] == 2) mark[sta[i + 1]] = 1;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  if (m & 1)
    printf("No solution");
  else {
    memset(vis, 0, sizeof(vis));
    memset(mark, 0, sizeof(mark));
    dfs(1, -1);
  }
}
