#include <bits/stdc++.h>
using namespace std;
const int max_n = 100 * 1000 + 1;
vector<int> adj[max_n];
bool vis[max_n];
int dfs(int at) {
  vis[at] = true;
  vector<int> tmp, child;
  for (int i = 0; i < (adj[at].size()); i++) {
    int to = adj[at][i];
    if (!vis[to]) {
      child.push_back(to);
    }
  }
  for (int i = 0; i < (child.size()); i++) {
    int to = child[i];
    int x = dfs(to);
    if (x != -1)
      printf("%d %d %d\n", x, to, at);
    else
      tmp.push_back(to);
  }
  for (int i = 0; i + 1 < tmp.size(); i += 2)
    printf("%d %d %d\n", tmp[i], at, tmp[i + 1]);
  return (tmp.size() & 1) ? tmp.back() : -1;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (m); i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  if (m & 1)
    printf("No solution\n");
  else {
    memset(vis, false, sizeof vis);
    dfs(1);
  }
  return 0;
}
