#include <bits/stdc++.h>
using namespace std;
int n;
int marker[100000];
vector<vector<int> > edge;
int dfs(int now) {
  if (marker[now]) return -1;
  marker[now] = 1;
  int cand = -1;
  int flip = 0;
  vector<int> real;
  for (int i = 0; i < edge[now].size(); i++) {
    int next = edge[now][i];
    if (marker[next]) continue;
    real.push_back(next);
  }
  for (int i = 0; i < real.size(); i++) {
    int next = real[i];
    int ret = dfs(next);
    if (ret > -1) {
      printf("%d %d %d\n", ret + 1, next + 1, now + 1);
    } else {
      if (flip == 0) {
        cand = next;
        flip = 1;
      } else {
        printf("%d %d %d\n", next + 1, now + 1, cand + 1);
        flip = 0;
      }
    }
  }
  if (flip == 0) return -1;
  return cand;
}
int main() {
  int m;
  scanf("%d %d", &n, &m);
  edge.resize(n);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    edge[a - 1].push_back(b - 1);
    edge[b - 1].push_back(a - 1);
  }
  if (m % 2 == 1) {
    printf("No solution\n");
    return 0;
  }
  dfs(0);
  return 0;
}
