#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, num;
} t;
const int T = 100010;
vector<node> tu[T];
bool vis[T];
int dfs(int x) {
  int l = (int)tu[x].size();
  node k;
  queue<int> q;
  for (int i = 0; i < l; i++) {
    k = tu[x][i];
    if (!vis[k.num]) {
      vis[k.num] = 1;
      int r = dfs(k.x);
      if (r)
        printf("%d %d %d\n", x, k.x, r);
      else
        q.push(k.x);
    }
  }
  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 m, n;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    t.num = i;
    t.x = b;
    tu[a].push_back(t);
    t.x = a;
    tu[b].push_back(t);
  }
  if (m & 1)
    printf("No solution\n");
  else {
    dfs(1);
  }
  return 0;
}
