#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, len, a, b, zhan[110000];
bool used[110000], u1[110000];
vector<int> ve[110000], ve1[110000];
void dfs(int k) {
  u1[k] = true;
  int i;
  for (i = 0; i < (int)ve[k].size(); i++)
    if (!u1[ve[k][i]]) dfs(ve[k][i]);
  int len = 0;
  for (i = 0; i < (int)ve[k].size(); i++)
    if (!used[ve[k][i]]) zhan[++len] = ve[k][i];
  for (i = 0; i < (int)ve1[k].size(); i++) zhan[++len] = ve1[k][i];
  for (i = len; i > 1; i -= 2) printf("%d %d %d\n", zhan[i], k, zhan[i - 1]);
  used[k] = true;
  if (i == 1) ve1[zhan[1]].push_back(k);
}
int main() {
  scanf("%d%d", &n, &m);
  if (m % 2 == 1) {
    printf("No solution\n");
    return 0;
  }
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &a, &b);
    ve[a].push_back(b);
    ve[b].push_back(a);
  }
  dfs(1);
}
