#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> g[100005];
map<pair<int, int>, int> done, blocked;
int processed[100005];
void print(int a, int b, int c) {
  cout << a << ' ' << b << ' ' << c << '\n';
  done[make_pair(a, b)] = done[make_pair(b, a)] = true;
  done[make_pair(b, c)] = done[make_pair(c, b)] = true;
}
int cut(int v) {
  vector<int> adj;
  for (size_t i = 0; i < g[v].size(); i++) {
    int u = g[v][i];
    if (!blocked[make_pair(v, u)]) {
      blocked[make_pair(v, u)] = blocked[make_pair(u, v)] = true;
      adj.push_back(u);
    }
  }
  int sz = adj.size();
  for (int i = 0; i < sz; i++) {
    int u = adj[i];
    if (!processed[u]) {
      int w = cut(u);
      if (w != 0) {
        print(v, u, w);
      }
    }
  }
  int u = 0;
  for (int i = 0; i < sz; i++) {
    int curr = adj[i];
    if (!done[make_pair(v, curr)]) {
      if (u == 0) {
        u = curr;
      } else {
        print(u, v, curr);
        u = 0;
      }
    }
  }
  processed[v] = true;
  return u;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  if (m % 2 == 1) {
    cout << "No solution" << endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  cut(1);
}
