#include <bits/stdc++.h>
using namespace std;
struct __timestamper {};
const int maxn = (int)(1e5 + 111);
set<int> g[maxn];
int n, m, a, b;
inline int calc(int v) {
  vector<int> adjacent, unpaired;
  for (set<int>::iterator it = g[v].begin(); it != g[v].end(); ++it) {
    int u = (*it);
    adjacent.push_back(u);
  }
  int an = adjacent.size();
  for (int i = 0; i < an; ++i) {
    int u = adjacent[i];
    g[v].erase(u);
    g[u].erase(v);
  }
  for (int i = 0; i < an; ++i) {
    int u = adjacent[i];
    int w = calc(u);
    if (w == 0)
      unpaired.push_back(u);
    else {
      printf("%d %d %d\n", v, u, w);
    }
  }
  int un = unpaired.size();
  for (int i = 0, j = 1; j < un; i += 2, j += 2)
    printf("%d %d %d\n", unpaired[i], v, unpaired[j]);
  if (un % 2 == 1) return unpaired[un - 1];
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &a, &b);
    g[a].insert(b);
    g[b].insert(a);
  }
  if (m % 2 == 1)
    printf("No solution");
  else {
    calc(1);
  }
  return 0;
}
