#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 10;
bool mark[MAXN];
int has[MAXN];
vector<int> adj[MAXN];
vector<pair<int, pair<int, int> > > ans;
void dfs(int x) {
  mark[x] = true;
  vector<int> t, check;
  for (__typeof((adj[x]).begin()) i = (adj[x]).begin(); i != (adj[x]).end();
       i++)
    if (!mark[*i]) check.push_back(*i);
  for (__typeof((check).begin()) i = (check).begin(); i != (check).end(); i++) {
    int v = *i;
    if (!mark[v]) dfs(v);
    if (has[v] != -1) {
      ans.push_back(make_pair(x, make_pair(v, has[v])));
      has[v] = -1;
    } else
      t.push_back(v);
  }
  while (((int)(t).size()) > 1) {
    int a = t.back();
    t.pop_back();
    int b = t.back();
    t.pop_back();
    ans.push_back(make_pair(a, make_pair(x, b)));
  }
  if (((int)(t).size()))
    has[x] = t[0];
  else
    has[x] = -1;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m & 1) {
    printf("No solution\n");
    return 0;
  }
  for (int i = 0; i < (m); i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--, y--;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  dfs(0);
  for (int i = 0; i < (((int)(ans).size())); i++)
    printf("%d %d %d\n", ans[i].first + 1, ans[i].second.first + 1,
           ans[i].second.second + 1);
  return 0;
}
