#include <bits/stdc++.h>
using namespace std;
int mk[100100];
vector<int> adj[100100];
bool rec(int v, int p) {
  mk[v] = 1;
  int vs[2], cnt = 0;
  for (int i = 0; i < adj[v].size(); i++) {
    int w = adj[v][i];
    if (mk[w] == 0) {
      if (!rec(w, v)) vs[cnt++] = w;
    } else if (mk[w] == 1 && p != w) {
      vs[cnt++] = w;
    }
    if (cnt == 2) {
      cnt = 0;
      printf("%d %d %d\n", vs[0], v, vs[1]);
    }
  }
  mk[v] = 2;
  if (cnt) {
    printf("%d %d %d\n", vs[0], v, p);
    return true;
  }
  return false;
}
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 {
    rec(1, -1);
  }
  return 0;
}
