#include <bits/stdc++.h>
using namespace std;
int n, m;
int viz[100005];
vector<int> W[100005];
set<int> G[100005];
void dfs(int nod, int t) {
  viz[nod] = 1;
  for (vector<int>::iterator itt = W[nod].begin(); itt != W[nod].end(); ++itt) {
    int fiu = (*itt);
    if (!viz[fiu]) {
      dfs(fiu, nod);
    }
  }
  int impar = 0;
  if (G[nod].size() & 1) {
    impar = 1;
    G[nod].erase(t);
  }
  set<int>::iterator itt1, itt2;
  for (itt1 = G[nod].begin(); itt1 != G[nod].end();) {
    itt2 = itt1;
    ++itt2;
    printf("%d %d %d\n", *itt1, nod, *itt2);
    G[*itt1].erase(nod);
    G[*itt2].erase(nod);
    itt1 = itt2;
    ++itt1;
  }
}
inline void solve() {
  if (m & 1) {
    printf("No solution\n");
    return;
  }
  dfs(1, 0);
}
int main() {
  scanf("%d %d", &n, &m);
  int x, y;
  for (int i = 1; i <= m; ++i) {
    scanf("%d %d", &x, &y);
    G[x].insert(y);
    W[x].push_back(y);
    G[y].insert(x);
    W[y].push_back(x);
  }
  solve();
  return 0;
}
