#include <bits/stdc++.h>
using namespace std;
struct edge {
  int u, v, id, next;
} edges[210000];
int head[110000], nCount = 0;
void AddEdge(int U, int V, int ID) {
  edges[++nCount].u = U;
  edges[nCount].v = V;
  edges[nCount].id = ID;
  edges[nCount].next = head[U];
  head[U] = nCount;
}
bool vis[210000];
vector<int> vec[110000];
int DFS(int u) {
  for (int p = head[u]; p != -1; p = edges[p].next) {
    int v = edges[p].v;
    if (vis[edges[p].id]) continue;
    vis[edges[p].id] = true;
    int tmp = DFS(v);
    if (tmp != -1) {
      printf("%d %d %d\n", u, v, tmp);
    } else
      vec[u].push_back(v);
  }
  for (int i = 0; i + 1 < vec[u].size(); i += 2)
    printf("%d %d %d\n", vec[u][i], u, vec[u][i + 1]);
  int tmp = -1;
  if (vec[u].size() % 2) tmp = vec[u][vec[u].size() - 1];
  vec[u].clear();
  return tmp;
}
int main() {
  memset(head, -1, sizeof(head));
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    AddEdge(u, v, i);
    AddEdge(v, u, i);
  }
  if (m % 2) {
    printf("No solution\n");
    return 0;
  }
  DFS(1);
  return 0;
}
