#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > by[100005];
int ans[100005][3], c = 0;
vector<int> E[100005];
int vis[100005], used[100005];
int n, m;
int dfs(int pre, int cur, int o) {
  used[cur] = 1;
  for (int i = 0; i < by[cur].size(); i++) {
    int u = by[cur][i].first, d = by[cur][i].second;
    if (vis[d] || used[u]) continue;
    vis[d] = 1;
    if (dfs(cur, u, 1 - o)) E[cur].push_back(u);
  }
  used[cur] = 0;
  int i;
  for (i = 0; i + 1 < E[cur].size(); i += 2) {
    ans[c][0] = E[cur][i];
    ans[c][1] = cur;
    ans[c][2] = E[cur][i + 1];
    c++;
  }
  if (i < E[cur].size()) {
    ans[c][0] = pre;
    ans[c][1] = cur;
    ans[c++][2] = E[cur][i];
    E[cur].clear();
    return 0;
  } else {
    E[cur].clear();
    return 1;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  if (m & 1) {
    printf("No solution\n");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (!by[i].empty()) by[i].clear();
  for (int i = 1; i <= n; i++)
    if (!E[i].empty()) E[i].clear();
  for (int i = m; i >= 1; i--) {
    int a, b;
    scanf("%d%d", &a, &b);
    by[a].push_back(pair<int, int>(b, i));
    by[b].push_back(pair<int, int>(a, i));
  }
  memset(vis, 0, sizeof(vis));
  dfs(-1, 1, 0);
  for (int i = 0; i < c; i++)
    printf("%d %d %d\n", ans[i][0], ans[i][1], ans[i][2]);
  return 0;
}
