#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> v[(int)1e5 + 5];
unordered_set<int> st[(int)1e5 + 5];
deque<deque<int>> fans;
bool vis[(int)1e5 + 5] = {};
deque<int> dfs(int node) {
  deque<int> vv, ans;
  vis[node] = true;
  for (auto u : v[node]) {
    if (!vis[u] && !st[node].count(u)) {
      ans = dfs(u);
      st[node].insert(u);
      st[u].insert(node);
      vis[u] = false;
      if (ans.size() == 2) {
        ans.push_front(node);
        fans.push_front(ans);
      } else if (ans.size() == 1) {
        if (vv.size() == 1) {
          vv.push_front(node);
          vv.push_front(ans[0]);
          fans.push_front(vv);
          vv.clear();
        } else if (!vv.size()) {
          vv.push_front(ans[0]);
        }
      }
    }
  }
  vv.push_front(node);
  return vv;
}
int main() {
  ios::sync_with_stdio(0), ios_base::sync_with_stdio(0), cin.tie(0),
      cout.tie(0);
  ;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  if (n <= 2 || m & 1) return cout << "No solution\n", 0;
  dfs(1);
  for (auto u : fans) {
    for (auto k : u) cout << k << " ";
    cout << "\n";
  }
  return 0;
}
