#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
void dbg(const char* fmt, ...) {}
using namespace std;
const int N = 100100;
vector<int> ed[N];
vector<int> back[N];
vector<int> child[N];
int par[N], d[N];
void dfs(int s, int p) {
  dbg("p = %d, s = %d\n", p, s);
  par[s] = p;
  d[s] = (p == -1) ? 0 : d[p] + 1;
  for (int i = 0; i < int(ed[s].size()); ++i) {
    int v = ed[s][i];
    if (v == p) continue;
    if (d[v] == -1) {
      child[s].push_back(v);
      dfs(v, s);
    } else if (d[v] < d[s]) {
      back[s].push_back(v);
      dbg("back %d -> %d\n", s, v);
    }
  }
}
void printPath(int a, int b, int c) {
  printf("%d %d %d\n", a + 1, b + 1, c + 1);
}
bool solve(int s, int p) {
  vector<int> lostChild;
  for (int i = 0; i < int(child[s].size()); ++i) {
    if (!solve(child[s][i], s)) lostChild.push_back(child[s][i]);
  }
  while (lostChild.size() >= 2) {
    int u = lostChild.back();
    lostChild.pop_back();
    int v = lostChild.back();
    lostChild.pop_back();
    printPath(u, s, v);
  }
  if (!lostChild.empty()) {
    if (back[s].empty()) {
      printPath(p, s, lostChild[0]);
      return true;
    } else {
      int u = back[s].back();
      back[s].pop_back();
      printPath(u, s, lostChild[0]);
    }
  }
  while (back[s].size() >= 2) {
    int u = back[s].back();
    back[s].pop_back();
    int v = back[s].back();
    back[s].pop_back();
    printPath(u, s, v);
  }
  if (back[s].empty()) {
    if (p == -1 || back[p].empty())
      return false;
    else {
      int u = back[p].back();
      back[p].pop_back();
      printPath(u, p, s);
      return true;
    }
  } else {
    int u = back[s].back();
    back[s].pop_back();
    printPath(u, s, p);
    return true;
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u, --v;
    ed[u].push_back(v);
    ed[v].push_back(u);
  }
  if (m % 2 == 1) {
    printf("No solution\n");
    return 0;
  }
  memset(d, 0xFF, sizeof(d));
  dfs(0, -1);
  solve(0, -1);
  return 0;
}
