#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
vector<int> ed[101000];
bool don[101000];
map<pair<int, int>, bool> vis;
int dfs(int x) {
  don[x] = true;
  vector<int> po;
  for (int i = 0; i < ed[x].size(); i++) {
    if (!don[ed[x][i]]) {
      vis[make_pair(x, ed[x][i])] = true;
      vis[make_pair(ed[x][i], x)] = true;
      int w = dfs(ed[x][i]);
      if (w) {
        printf("%d %d %d\n", x, ed[x][i], w);
      } else {
        po.push_back(ed[x][i]);
      }
    } else if (!vis[make_pair(x, ed[x][i])]) {
      vis[make_pair(x, ed[x][i])] = true;
      vis[make_pair(ed[x][i], x)] = true;
      po.push_back(ed[x][i]);
    }
  }
  for (int i = 1; i < po.size(); i += 2) {
    printf("%d %d %d\n", po[i - 1], x, po[i]);
  }
  if (po.size() % 2)
    return po[po.size() - 1];
  else
    return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    ed[x].push_back(y);
    ed[y].push_back(x);
  }
  if (m % 2) {
    printf("No solution\n");
    return 0;
  }
  dfs(1);
  return 0;
}
