#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int notP[maxn], vis[maxn];
vector<vector<int> > v;
int timer = 1;
void addEdge(int x, int z) {
  if (!notP[x])
    notP[x] = z;
  else {
    printf("%d %d %d\n", notP[x], x, z);
    notP[x] = 0;
  }
}
int dfs(int x, int parent) {
  vis[x] = timer++;
  for (int i = 0; i < v[x].size(); i++) {
    int u = v[x][i];
    if (vis[u]) {
      if (u != parent && vis[u] < vis[x]) {
        addEdge(u, x);
      }
      continue;
    }
    dfs(u, x);
    if (notP[u])
      addEdge(u, x);
    else
      addEdge(x, u);
  }
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  v.resize(n + 1);
  if (m % 2) {
    puts("No solution");
    return 0;
  }
  while (m--) {
    int a, b;
    scanf("%d %d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(1, 0);
}
