#include <bits/stdc++.h>
using namespace std;
int first[100005], vv[200005], nxt[200005], e;
int tp[100005];
vector<int> son[100005];
void add(int u, int v) {
  vv[e] = v;
  nxt[e] = first[u];
  first[u] = e++;
}
void relax(int u) {
  if (son[u].size() == 2) {
    printf("%d %d %d\n", son[u][0], u, son[u][1]);
    son[u].clear();
  }
}
int dfs(int u, int p) {
  tp[u] = 1;
  for (int i = first[u]; i != -1; i = nxt[i]) {
    int v = vv[i];
    if (v == p) continue;
    if (tp[v] == 0) {
      int k = dfs(v, u);
      if (k == 1) son[u].push_back(v);
      relax(u);
    } else if (tp[v] == 2) {
      son[u].push_back(v);
      relax(u);
    }
  }
  tp[u] = 2;
  if (son[u].empty()) return 1;
  printf("%d %d %d\n", p, u, son[u][0]);
  son[u].clear();
  return 0;
}
int main() {
  int n, m, u, v;
  cin >> n >> m;
  memset(first, -1, sizeof(first));
  for (int i = 1; i <= m; ++i) {
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  if (m & 1)
    puts("No solution");
  else
    dfs(1, -1);
  return 0;
}
