#include <bits/stdc++.h>
using namespace std;
struct edge {
  int id, num;
} t;
vector<edge> v[100005];
bool flag[100005];
int dfs(int x) {
  queue<int> q;
  edge k;
  int l = v[x].size();
  for (int i = 0; i < l; i++) {
    k = v[x][i];
    if (flag[k.id]) continue;
    flag[k.id] = 1;
    int r = dfs(k.num);
    if (r)
      printf("%d %d %d\n", x, k.num, r);
    else
      q.push(k.num);
  }
  while (q.size() >= 2) {
    int a = q.front();
    q.pop();
    int b = q.front();
    q.pop();
    printf("%d %d %d\n", a, x, b);
  }
  if (!q.empty()) {
    return q.front();
  }
  return 0;
}
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    int a, b;
    for (int i = 0; i <= n; i++) v[i].clear();
    memset(flag, 0, sizeof(flag));
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &a, &b);
      t.id = i;
      t.num = b;
      v[a].push_back(t);
      t.num = a;
      v[b].push_back(t);
    }
    if (m & 1)
      printf("No solution\n");
    else
      dfs(1);
  }
  return 0;
}
