#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
vector<int> m[100100];
int u[100100], c;
bool dfs(int i, int p) {
  int j, k, v;
  u[i] = c++;
  v = -1;
  for (j = 0; j < m[i].size(); j++) {
    k = m[i][j];
    if (k == p) continue;
    if (!u[k]) {
      if (dfs(k, i)) {
        if (v == -1)
          v = k;
        else {
          printf("%d %d %d\n", k + 1, i + 1, v + 1);
          v = -1;
        }
      }
    } else if (u[k] < u[i]) {
      if (v == -1)
        v = k;
      else {
        printf("%d %d %d\n", k + 1, i + 1, v + 1);
        v = -1;
      }
    }
  }
  if (v != -1) {
    printf("%d %d %d\n", v + 1, i + 1, p + 1);
    return 0;
  } else
    return 1;
}
int main() {
  int n, k, i, j;
  scanf("%d%d", &n, &k);
  if (k % 2)
    printf("No solution\n");
  else {
    for (; k--;
         scanf("%d%d", &i, &j), i--, j--, m[i].push_back(j), m[j].push_back(i))
      ;
    c = 1;
    dfs(0, -1);
  }
  return 0;
}
