#include <bits/stdc++.h>
using namespace std;
const int mxn = 100006;
const int mxm = 100006 * 2;
int n, m;
int fe[mxn] = {};
int ne[mxm];
int ev[mxm];
bool v[mxm];
int el = 1;
void add1(int L, int R) {
  ++el;
  ne[el] = fe[L];
  fe[L] = el;
  ev[el] = R;
}
bool vis[mxn];
int dfs(int x) {
  if (vis[x]) return 0;
  vis[x] = true;
  int last = 0;
  for (int i = fe[x]; i; i = ne[i])
    if (!v[i]) {
      v[i] = v[i ^ 1] = true;
      int t = dfs(ev[i]);
      if (t) {
        printf("%d %d %d\n", x, ev[i], t);
      } else {
        if (last) {
          printf("%d %d %d\n", last, x, ev[i]);
          last = 0;
        } else {
          last = ev[i];
        }
      }
    }
  return last;
}
void EXEC() {
  cin >> n >> m;
  if (m % 2 == 1) {
    cout << "No solution" << endl;
    return;
  }
  for (int i = 0; i < m; ++i) {
    int L, R;
    scanf("%d%d", &L, &R);
    add1(L, R);
    add1(R, L);
  }
  dfs(1);
}
int main() {
  EXEC();
  return 0;
}
