#include <bits/stdc++.h>
const int inf = 1 << 30;
const long long INF = 1ll << 61;
using namespace std;
int n, m;
typedef struct Node {
  int fro, to;
  int nex;
  int val;
};
Node edge[100000 * 2 + 55];
int head[100000 * 2 + 55];
bool vis[100000 * 2 + 55];
int tot;
void init() {
  memset(vis, 0, sizeof(vis));
  memset(head, -1, sizeof(head));
  tot = 0;
}
void add(int u, int v) {
  edge[tot].fro = u;
  edge[tot].to = v;
  edge[tot].nex = head[u];
  head[u] = tot++;
}
bool input() {
  while (cin >> n >> m) {
    int q = m;
    while (q--) {
      int u, v;
      scanf("%d %d", &u, &v);
      add(u, v);
      add(v, u);
    }
    return false;
  }
  return true;
}
int dfs(int u, int pre) {
  queue<int> q;
  for (int i = head[u]; i != -1; i = edge[i].nex) {
    int v = edge[i].to;
    if (vis[i] || v == pre) continue;
    vis[i] = vis[i ^ 1] = true;
    int tmp = dfs(v, u);
    if (tmp)
      printf("%d %d %d\n", u, v, tmp);
    else
      q.push(v);
  }
  while (q.size() > 1) {
    int aa = q.front();
    q.pop();
    int bb = q.front();
    q.pop();
    printf("%d %d %d\n", aa, u, bb);
  }
  if (!q.empty()) {
    int aa = q.front();
    q.pop();
    return aa;
  }
  return 0;
}
void cal() {
  if (m & 1) {
    puts("No solution");
    return;
  }
  dfs(1, -1);
}
void output() {}
int main() {
  while (true) {
    init();
    if (input()) return 0;
    cal();
    output();
  }
  return 0;
}
