#include <bits/stdc++.h>
using namespace std;
int N, M, x, y;
vector<pair<int, int> > m[100100];
bool viz[100100];
int do_stuff(int b) {
  bool curr = 0;
  int u[2];
  for (int i = 0; i < m[b].size(); ++i) {
    int a = m[b][i].first;
    if (viz[m[b][i].second] == 0) {
      viz[m[b][i].second] = 1;
      int c = do_stuff(a);
      if (c == 0) {
        u[curr] = a;
        if (curr == 1) {
          printf("%d %d %d\n", u[0], b, u[1]);
        }
        curr = 1 - curr;
      } else {
        printf("%d %d %d\n", b, a, c);
      }
    }
  }
  if (curr == 1) {
    return u[0];
  } else {
    return 0;
  }
}
int main() {
  scanf("%d%d", &N, &M);
  if (M % 2 == 1) {
    printf("No solution");
    return 0;
  }
  for (int i = 1; i <= M; ++i) {
    scanf("%d%d", &x, &y);
    m[x].push_back(make_pair(y, i));
    m[y].push_back(make_pair(x, i));
  }
  do_stuff(1);
  return 0;
}
