#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int n, m, a, b, bio[MAXN];
map<pair<int, int>, bool> mp;
vector<int> v[MAXN];
void block(int a, int b) {
  mp[make_pair(a, b)] = 1;
  mp[make_pair(b, a)] = 1;
}
int dfs(int cvor) {
  if (bio[cvor]) return 0;
  bio[cvor] = 1;
  vector<int> susjedi;
  for (int i = (0); i < int((int)v[cvor].size()); i++) {
    int ncvor = v[cvor][i];
    if (mp[make_pair(cvor, ncvor)]) continue;
    susjedi.push_back(ncvor);
  }
  for (int i = (0); i < int((int)susjedi.size()); i++) block(cvor, susjedi[i]);
  vector<int> fail;
  for (int i = (0); i < int((int)susjedi.size()); i++) {
    int x = dfs(susjedi[i]);
    if (!x)
      fail.push_back(susjedi[i]);
    else
      printf("%d %d %d\n", cvor, susjedi[i], x);
  }
  while ((int)fail.size() >= 2) {
    int x = fail.back();
    fail.pop_back();
    int y = fail.back();
    fail.pop_back();
    printf("%d %d %d\n", x, cvor, y);
  }
  if (!fail.empty()) return fail.back();
  return 0;
}
int main() {
  scanf("%d %d", &n, &m);
  if (m % 2) {
    puts("No solution");
    return 0;
  }
  for (int i = (0); i < int(m); i++) {
    scanf("%d %d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = (1); i < int(n + 1); i++)
    if (!bio[i]) dfs(i);
  return 0;
}
