#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
constexpr int N = 1e5 + 5;
set<int> gr[N];
vector<int> deg;
vector<bool> used;
int n, m, a, b;
void add_edge(int a, int b) {
  gr[a].insert(b);
  gr[b].insert(a);
}
int dfs(int i = 1, int p = 1) {
  used[i] = 1;
  vector<int> temp;
  for (int j : gr[i]) {
    if (j == p) continue;
    if (used[j]) {
      temp.push_back(j);
      gr[j].erase(i);
    } else {
      int dop = dfs(j, i);
      if (dop) temp.push_back(dop);
    }
  }
  while (temp.size() > 1) {
    cout << temp.back() << " " << i << " ";
    temp.pop_back();
    cout << temp.back() << "\n";
    temp.pop_back();
  }
  if (temp.size()) {
    cout << temp.back() << " " << i << " " << p << "\n";
    return 0;
  } else
    return i;
}
void Solve() {
  cin >> n >> m;
  deg.resize(n + 1);
  used.resize(n + 1);
  if (m % 2) {
    cout << "No solution";
    return;
  }
  while (m--) {
    cin >> a >> b;
    add_edge(a, b);
  }
  dfs();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  Solve();
  return 0;
}
