#include <bits/stdc++.h>
using namespace std;
inline long long int gcd(long long int a, long long int b) {
  long long int t;
  while (b) {
    a = a % b;
    t = a;
    a = b;
    b = t;
  }
  return a;
}
using namespace std;
const int MAXN = (long long int)1e5 + 100;
long long int n, m;
vector<long long int> v1[MAXN];
bool block[MAXN], vis[MAXN];
long long int DFS(long long int node = 0) {
  vis[node] = 1;
  block[node] = 1;
  vector<long long int> temp;
  for (long long int u : v1[node]) {
    if (block[u] == false) {
      long long int ind = -1;
      if (vis[u] == false) ind = DFS(u);
      if (ind == -1)
        temp.push_back(u);
      else {
        cout << ind + 1 << " " << u + 1 << " " << node + 1 << endl;
      }
    }
  }
  while (temp.size() > 1) {
    cout << temp.back() + 1 << " " << node + 1 << " ";
    temp.pop_back();
    cout << temp.back() + 1 << " " << endl;
    temp.pop_back();
  }
  long long int ret = -1;
  if (temp.size() & 1) {
    ret = temp.back();
    temp.pop_back();
  }
  block[node] = 0;
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (long long int i = 0; i < m; i++) {
    long long int a, b;
    cin >> a >> b;
    a -= 1;
    b -= 1;
    v1[a].push_back(b);
    v1[b].push_back(a);
  }
  if (m & 1) {
    cout << "No solution";
    return 0;
  }
  DFS();
  return 0;
}
