#include <bits/stdc++.h>
using namespace std;
const int maxn = 101 * 1000;
const int maxm = 101 * 1000;
vector<int> v[maxn];
int n, m;
int edge[maxm][2];
bool used[maxm];
bool mark[maxn];
void dfs(int a, int father) {
  mark[a] = true;
  for (int i = 0; i < (int)v[a].size(); i++) {
    int t = v[a][i];
    int t2 = edge[t][0] + edge[t][1] - a;
    if (!mark[t2]) {
      dfs(t2, a);
    }
  }
  vector<int> ans;
  ans.clear();
  int fat = -1;
  for (int i = 0; i < (int)v[a].size(); i++) {
    int t = v[a][i];
    int t2 = edge[t][0] + edge[t][1] - a;
    if (t2 == father) fat = t;
    if (!used[t] && t2 != father) {
      ans.push_back(t);
      used[t] = true;
    }
  }
  for (int i = 1; i < (int)ans.size(); i += 2) {
    int t = ans[i];
    int t2 = edge[t][0] + edge[t][1] - a;
    t = ans[i - 1];
    int t3 = edge[t][0] + edge[t][1] - a;
    cout << t2 + 1 << " " << a + 1 << " " << t3 + 1 << endl;
  }
  if (ans.size() % 2 == 1) {
    int t = ans[ans.size() - 1];
    int t2 = edge[t][0] + edge[t][1] - a;
    used[fat] = true;
    cout << father + 1 << " " << a + 1 << " " << t2 + 1 << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  if (m % 2 == 1) {
    cout << "No solution" << endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    edge[i][0] = a;
    edge[i][1] = b;
    v[a].push_back(i);
    v[b].push_back(i);
  }
  dfs(0, -1);
  return 0;
}
