#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 10;
const long long int INF = 2e18 + 10;
const int Mod = 1e6;
const int MAXN = 1000010;
const int N = 1e5 + 10;
const int M = 1e3 + 10;
const int M1 = 1e9 + 7;
const int M2 = 1e9 + 9;
const int base = 131;
int n, m;
vector<pair<int, int> > G[N];
int block[N];
int dfs(int u) {
  vector<int> adj;
  for (auto v : G[u]) {
    if (block[v.second]) continue;
    adj.push_back(v.first);
    block[v.second] = 1;
  }
  vector<int> unpaired;
  for (auto v : adj) {
    int w = dfs(v);
    if (w == 0)
      unpaired.push_back(v);
    else
      printf("%d %d %d\n", u, v, w);
  }
  while (unpaired.size() >= 2) {
    int x = unpaired.back();
    unpaired.pop_back();
    int y = unpaired.back();
    unpaired.pop_back();
    printf("%d %d %d\n", x, u, y);
  }
  if (unpaired.size()) {
    int x = unpaired.back();
    unpaired.pop_back();
    return x;
  } else
    return 0;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cout.tie(0);
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    G[x].push_back({y, i});
    G[y].push_back({x, i});
  }
  if (m & 1) {
    cout << "No solution" << endl;
    return 0;
  }
  dfs(1);
  return 0;
}
