#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 10;
int N, M, flag[MAXN];
vector<int> g[MAXN];
int dfs(int now, int fa) {
  flag[now] = 1;
  int pre = 0;
  for (int i = 0; i < g[now].size(); ++i) {
    int x = g[now][i];
    if (flag[x] < 2 && x != fa) {
      int q = (flag[x] == 1) ? 0 : dfs(x, now);
      if (q)
        printf("%d %d %d\n", q, x, now);
      else if (pre) {
        printf("%d %d %d\n", pre, now, x);
        pre = 0;
      } else
        pre = x;
    }
  }
  flag[now] = 2;
  return pre;
}
int main() {
  scanf("%d%d", &N, &M);
  if (M & 1)
    puts("No solution");
  else {
    for (int i = 1, a, b; i <= M; ++i) {
      scanf("%d%d", &a, &b);
      g[a].push_back(b);
      g[b].push_back(a);
    }
    dfs(1, 0);
  }
  return 0;
}
