#include <bits/stdc++.h>
using namespace std;
int n, m;
bool v[100100];
int r[100100];
int r1[100100];
int r2[100100];
int k;
vector<int> p[100100];
set<pair<int, int> > st;
int dfs(int x) {
  if (v[x]) return 0;
  v[x] = 1;
  int l = 0;
  for (int i = 0; i < p[x].size(); i++) {
    int y = p[x][i];
    if (st.count({x, y})) continue;
    st.insert({x, y});
    st.insert({y, x});
    int z = dfs(y);
    if (z) {
      r[k] = x;
      r1[k] = y;
      r2[k++] = z;
      st.insert({y, z});
      st.insert({z, y});
    } else {
      if (l) {
        r[k] = y;
        r1[k] = x;
        r2[k++] = l;
        l = 0;
      } else
        l = y;
    }
  }
  return l;
}
int main() {
  cin >> n >> m;
  int x, y;
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &x, &y);
    p[x].push_back(y);
    p[y].push_back(x);
  }
  dfs(1);
  if (m % 2 != 0 || m / 2 != k) {
    cout << "No solution\n";
    return 0;
  }
  for (int i = 0; i < k; i++) {
    printf("%d %d %d\n", r[i], r1[i], r2[i]);
  }
  return 0;
}
