#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200009;
int N, M;
int x[MAXN], y[MAXN];
bool flag[MAXN];
bool eflag[MAXN];
vector<vector<int> > g(MAXN);
vector<pair<int, int> > ans;
int other(int v, int e) { return x[e] + y[e] - v; }
vector<int> dfs(int v, int e) {
  vector<int> r;
  flag[v] = true;
  if (e != -1) eflag[e] = true;
  for (int i = 0; i < g[v].size(); i++) {
    int t = other(v, g[v][i]);
    if (!flag[t]) {
      vector<int> tmp = dfs(t, g[v][i]);
      for (int i = 0; i < tmp.size(); i++) {
        r.push_back(tmp[i]);
      }
    } else if (!eflag[g[v][i]]) {
      eflag[g[v][i]] = true;
      r.push_back(g[v][i]);
    }
  }
  r.push_back(e);
  for (int i = 0; i < r.size() / 2; i++) {
    int x = r[2 * i];
    int y = r[2 * i + 1];
    ans.push_back(make_pair(x, y));
  }
  if (r.size() % 2 == 0) {
    r.resize(0);
  } else {
    r[0] = r[r.size() - 1];
    r.resize(1);
  }
  return r;
}
void merge(int a, int b) {
  if (y[a] == x[b]) {
    printf("%d %d %d\n", x[a], y[a], y[b]);
  } else if (y[a] == y[b]) {
    printf("%d %d %d\n", x[a], y[a], x[b]);
  } else if (x[a] == x[b]) {
    printf("%d %d %d\n", y[a], x[a], y[b]);
  } else if (x[a] == y[b]) {
    printf("%d %d %d\n", y[a], x[a], x[b]);
  }
}
int main() {
  cin >> N >> M;
  if (M % 2 == 1) {
    cout << "No solution" << endl;
    return 0;
  }
  for (int i = 0; i < M; i++) {
    scanf("%d %d", x + i, y + i);
    g[x[i]].push_back(i);
    g[y[i]].push_back(i);
  }
  dfs(1, -1);
  for (int i = 0; i < ans.size(); i++) {
    merge(ans[i].first, ans[i].second);
  }
}
