#include <bits/stdc++.h>
using namespace std;
int n, m;
int tot = 1, there[200005], head[100005], nx[200005];
bool mark[200005];
inline void addedge(int x, int y) {
  ++tot;
  there[tot] = y;
  nx[tot] = head[x];
  head[x] = tot;
  ++tot;
  there[tot] = x;
  nx[tot] = head[y];
  head[y] = tot;
}
int dfs(int x) {
  vector<int> rest, will;
  rest.clear();
  will.clear();
  for (int i = head[x]; i; i = nx[i])
    if (!mark[i]) {
      int u = there[i];
      mark[i] = mark[i ^ 1] = 1;
      will.push_back(u);
    }
  for (int i = 0; i != will.size(); ++i) {
    int u = will[i];
    int w = dfs(u);
    if (w == 0)
      rest.push_back(u);
    else
      printf("%d %d %d\n", x, u, w);
  }
  int k = rest.size();
  if (k >= 2) {
    for (int i = 0; i + 1 < k; i += 2) {
      printf("%d %d %d\n", rest[i], x, rest[i + 1]);
    }
  }
  if (k % 2) return rest[k - 1];
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  int u, v;
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &u, &v);
    addedge(u, v);
  }
  if (m % 2) {
    printf("No solution\n");
    return 0;
  }
  dfs(1);
  return 0;
}
