#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> x[100009];
set<int> has[100009];
bool f[100009];
void dfs(int node, int fa) {
  for (vector<int>::iterator it = x[node].begin(); it != x[node].end(); it++) {
    if (!f[(*it)]) {
      f[(*it)] = true;
      dfs((*it), node);
    }
  }
  if (has[node].size() & 1) {
    has[node].erase(has[node].find(fa));
  }
  for (set<int>::iterator it = has[node].begin(), it1; it != has[node].end();
       it++) {
    it1 = it++;
    printf("%d %d %d\n", (*it1), node, (*it));
    has[(*it)].erase(node);
    has[(*it1)].erase(node);
  }
  return;
}
int main() {
  cin >> n >> m;
  for (int i = 0, ca, cb; i < m; i++) {
    scanf("%d%d", &ca, &cb);
    x[ca].push_back(cb);
    x[cb].push_back(ca);
    has[ca].insert(cb);
    has[cb].insert(ca);
  }
  if (m % 2 == 1) {
    cout << "No solution" << endl;
    return 0;
  }
  f[1] = true;
  dfs(1, 0);
  return 0;
}
