#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > edge[100100];
bool used[100100];
int dfs(int u) {
  int last = 0;
  vector<int> candidates;
  for (int i = 0; i < edge[u].size(); i++) {
    if (!used[edge[u][i].second]) {
      used[edge[u][i].second] = true;
      candidates.push_back(edge[u][i].first);
    }
  }
  for (int i = 0; i < candidates.size(); i++) {
    int v = dfs(candidates[i]);
    if (v != candidates[i]) {
      printf("%d %d %d\n", u, candidates[i], v);
    } else {
      if (!last) {
        last = candidates[i];
      } else {
        printf("%d %d %d\n", last, u, v);
        last = 0;
      }
    }
  }
  return last == 0 ? u : last;
}
void Solve() {
  int i, j, k, n, m;
  scanf("%d%d", &(n), &(m));
  if (m % 2 == 1)
    printf("No solution");
  else {
    for (i = 0; i < m; i++) {
      int u, v;
      scanf("%d%d", &(u), &(v));
      edge[u].push_back(make_pair(v, i));
      edge[v].push_back(make_pair(u, i));
    }
    dfs(1);
  }
}
int main() {
  Solve();
  return 0;
}
