#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9, maxn = 2e5 + 5;
int n, m;
struct edges {
  int to, nxt;
} ed[maxn << 1];
int head[maxn], ecnt = 1, deep[maxn], vise[maxn];
int stk[maxn], tp = 0;
void add(int x, int y) {
  ed[++ecnt].to = y;
  ed[ecnt].nxt = head[x];
  head[x] = ecnt;
}
void dfs(int x) {
  int lst = tp;
  for (int i = head[x]; i != -1; i = ed[i].nxt) {
    if (!vise[i]) {
      vise[i] = vise[i ^ 1] = 1;
      int u = ed[i].to, qc = tp;
      dfs(u);
      if (tp != qc) {
        printf("%d %d %d\n", x, u, stk[tp--]);
      } else
        stk[++tp] = u;
    }
  }
  for (; tp - 2 >= lst; tp -= 2) printf("%d %d %d\n", stk[tp], x, stk[tp - 1]);
}
int main() {
  memset(head, -1, sizeof head);
  scanf("%d%d", &n, &m);
  if (m & 1) return puts("No solution"), 0;
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(1);
  return 0;
}
