#include <bits/stdc++.h>
using namespace std;
int n, m;
map<pair<int, int>, bool> edges;
bool& e(int x, int y) { return edges[make_pair(min(x, y), max(x, y))]; }
int vis[100100];
vector<int> adj[100100];
int dfs(int x, int from = -1) {
  if (vis[x]++) return -1;
  for (int y : adj[x])
    if (y != from) {
      int rest = dfs(y, x);
      if (rest >= 0) {
        cout << x << " " << y << " " << rest << endl;
        e(x, y) = e(y, rest) = 1;
      }
    }
  int last = -1;
  for (int y : adj[x])
    if (y != from && !e(x, y))
      if (last != -1) {
        cout << last << " " << x << " " << y << endl;
        e(last, x) = e(x, y) = 1;
        last = -1;
      } else
        last = y;
  return last;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  if (m & 1) {
    cout << "No solution";
    return 0;
  }
  while (m--) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(1);
}
