#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct node {
  int u, v, next;
} edge[N * 2];
int head[N * 2], cnt;
bool vis[N * 2];
void add(int a, int b) {
  edge[cnt].u = a;
  edge[cnt].v = b;
  edge[cnt].next = head[a];
  head[a] = cnt++;
}
int dfs(int p1, int p2) {
  queue<int> vec;
  for (int i = head[p1]; i > -1; i = edge[i].next) {
    int t = edge[i].v;
    if (vis[i] || t == p2) continue;
    vis[i] = vis[i ^ 1] = 1;
    int g = dfs(t, p1);
    if (g) {
      printf("%d %d %d\n", p1, t, g);
    } else
      vec.push(t);
  }
  while (vec.size() >= 2) {
    int t1 = vec.front();
    vec.pop();
    int t2 = vec.front();
    vec.pop();
    printf("%d %d %d\n", t1, p1, t2);
  }
  if (vec.size() > 0) {
    int r = vec.front();
    vec.pop();
    return r;
  }
  return 0;
}
int main() {
  int n, m;
  while (cin >> n >> m) {
    memset(head, -1, sizeof(head));
    memset(vis, 0, sizeof(vis));
    cnt = 0;
    int a, b;
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &a, &b);
      add(a, b);
      add(b, a);
    }
    if (m & 1) {
      puts("No solution");
      continue;
    }
    dfs(1, -1);
  }
  return 0;
}
