#include <bits/stdc++.h>
using namespace std;
vector<int> G[100010];
int deg[100010], vis[100010];
void dfs(int nod, int dad) {
  vis[nod] = 1;
  vector<int>::iterator it;
  for (it = G[nod].begin(); it != G[nod].end(); ++it)
    if (!vis[*it]) dfs(*it, nod);
  if (deg[nod] % 2 == 0) dad = -1;
  for (it = G[nod].begin(); it != G[nod].end(); ++it)
    if (deg[*it] && *it != dad) {
      printf("%d %d", *it, nod);
      --deg[*it];
      while (1) {
        ++it;
        if (deg[*it] && *it != dad) {
          printf(" %d\n", *it);
          --deg[*it];
          break;
        }
      }
    }
  deg[nod] = deg[nod] % 2;
}
int main() {
  int N, M;
  scanf("%d%d", &N, &M);
  if (M % 2) {
    printf("No solution");
    return 0;
  }
  for (int i = 1; i <= M; ++i) {
    int xx, yy;
    scanf("%d%d", &xx, &yy);
    G[xx].push_back(yy);
    G[yy].push_back(xx);
    ++deg[xx];
    ++deg[yy];
  }
  dfs(1, -1);
  return 0;
}
