#include <bits/stdc++.h>
using namespace std;
int n, m;
int u[1001000], v[1001000], p[1001000], nx[1001000], vis[1001000], use[1001000],
    sz, pre[1001000];
vector<int> vec[1001000];
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  for (int i = p[x]; i != -1; i = nx[i]) {
    int y = v[i];
    if (!vis[y]) {
      pre[y] = x;
      dfs(y);
    }
    if (y == pre[x]) vec[x].push_back(i);
  }
  for (int i = p[x]; i != -1; i = nx[i])
    if (!use[i] && v[i] != pre[x]) vec[x].push_back(i);
  while (vec[x].size() > 1) {
    int a = vec[x].back();
    vec[x].pop_back();
    int b = vec[x].back();
    vec[x].pop_back();
    printf("%d %d %d\n", v[a] + 1, u[a] + 1, v[b] + 1);
    use[a] = use[a ^ 1] = use[b] = use[b ^ 1] = 1;
  }
}
int main() {
  scanf("%d%d\n", &n, &m);
  if (m & 1) {
    puts("No solution");
    return 0;
  }
  memset(p, -1, sizeof(p));
  memset(pre, -1, sizeof(pre));
  for (int i = (0); i < (m); i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--;
    b--;
    nx[sz] = p[a];
    u[sz] = a;
    v[sz] = b;
    p[a] = sz++;
    nx[sz] = p[b];
    u[sz] = b;
    v[sz] = a;
    p[b] = sz++;
  }
  dfs(0);
  return 0;
}
