#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
vector<pair<int, int>> e[N];
vector<char> used;
int dfs(int v = 0) {
  vector<int> adj;
  for (auto i : e[v])
    if (!used[i.second]) {
      adj.push_back(i.first);
      used[i.second] = true;
    }
  vector<int> unpaired;
  for (int to : adj) {
    int w = dfs(to);
    if (w == -1) {
      unpaired.push_back(to);
    } else {
      printf("%d %d %d\n", v + 1, to + 1, w + 1);
    }
  }
  while (unpaired.size() >= 2) {
    int x = unpaired.back();
    unpaired.pop_back();
    int y = unpaired.back();
    unpaired.pop_back();
    printf("%d %d %d\n", x + 1, v + 1, y + 1);
  }
  return unpaired.empty() ? -1 : unpaired[0];
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m & 1) {
    printf("No solution");
    return 0;
  }
  used.assign(m, false);
  for (int i = 0; i < m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--;
    y--;
    e[x].push_back({y, i});
    e[y].push_back({x, i});
  }
  dfs();
  return 0;
}
