#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5 ;
const double eps = 1e-9 ;
const int MAX_N = 1e6 + 5 ;
const long long M = (long long)1e9+7 ;
#define     ll      long long
#define     ull     unsigned long long
int Int() {
    int x;
    scanf("%d",&x);
    return x;
}
ll Long() {
    ll x;
    scanf("%lld",&x);
    return x;
}
void Char(char* ch) {
    scanf("%s",ch);
}
template<typename t>inline t abs(t a) { if(a>=0) return a; return -a;}
template<typename t>inline t gcd(t a , t b) {return !b ? a : gcd(b , a % b);}
template<typename t>inline t lcm(t a , t b) {return a * ( b /gcd(a , b));}
template<typename T>inline T modpow(T b, T p, T Mod) {
    T res  = 1;
    while(p) {
        if(p&1) {
            res *= b ;
            res %= Mod ;
        }
        b *= b;
        b %= Mod;
        p >>= 1;
    }
    return res ;
}

template<typename T> inline T ModInv(T b, T Mod) {return modpow(b, Mod - 2, Mod );}

template<typename T> inline T pwr(T b, T p) {
    T res  = 1;
    while(p) {
        if(p&1) {
            res *= b ;
        }
        b *= b;
        p >>= 1;
    }
    return res ;
}
int e1 , e2 , d1 ;
template < typename T >inline void extgcd(T a , T b){
    if(!b) {e1 = 1 , e2 = 0 , d1 = a ; return ;}
    extgcd(b , a % b) ;
    T x1 = e2 ;
    T y1 = e1 - (a / b) * e2 ;
    e1 = x1 ;
    e2 = y1 ;
}

/*primes in range 1 - n
1 - 100(1e2) -> 25 pimes
1 - 1000(1e3) -> 168 primes
1 - 10000(1e4) -> 1229 primes
1 - 100000(1e5) -> 9592 primes
1 - 1000000(1e6) -> 78498 primes
1 - 10000000(1e7) -> 664579 primes
large primes ->
104729 1299709 15485863 179424673 2147483647 32416190071 112272535095293 48112959837082048697
*/
/*
std::vector<int> primes;
bitset < MAX_N > bs;
ll sieve_size = MAX_N ;

void sieve(ll n){
    bs.set() ;
    bs[0] = bs[1] = 1 ;
    for(ll i = 2 ; i <= n ; i++)if(bs[i]){
        for(ll j = i * i ; j <= n ; j += i) bs[j] = 0 ;
            primes.push_back((int)i);
    }
}

bool isprime(ll n){
    if(n <= sieve_size)return bs[n] ;
    for(int i = 0 ; i <= (int)primes.size() ; i++){
        if(n % primes[i] == 0)return false ;
    }
    return true ;
}

int numDiffPf[MAX_N] ;

void DiffPF(){
    for(int i = 2 ; i < MAX_N ; i++){
        if(numDiffPf[i] == 0){
            for(int j = i ; j < MAX_N ; j += i)numDiffPf[j]++;
        }
    }
}

int Phi[MAX_N] ;

void EulerPHI(){
    for(int i = 1 ; i < MAX_N ; i++)Phi[i] = i ;
        for(int i = 2 ; i < MAX_N ; i++)
            if(Phi[i] == i)
                for(int j = i ; j < MAX_N ; j += i)
                    Phi[j] = (Phi[j]/i) * (i - 1) ;
}

int F(int x){
    return 0 ;
}
pair < int , int > floydCycle(int x0){
    int tor = F(x0) , hare = F(F(x0)) ;
    while(tor != hare){tor = F(tor) , hare = F(F(hare));}
    int mu = 0 ; hare = x0 ;
    while(tor != hare){tor = F(tor) , hare = F(hare); mu++ ;}
    int lambda = 1 ; hare = F(tor) ;
    while(tor != hare){hare = F(hare) ; lambda++;}
    return {mu , lambda} ;
}
*/
template <typename T>inline vector< T > Unique(vector< T > v) {
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()),v.end());
    return v;
}
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
///error///
#define error(args...) {vector<string>_v=split(#args,',');err(_v.begin(),args);cout<<endl;}
vector<string> split(const string &s,char c) {
    vector<string>v;
    stringstream ss(s);
    string x;
    while(getline(ss,x,c))
        v.emplace_back(x);
    return move(v);
}

void err(vector<string>::iterator it) {}
template<typename T,typename... Args>
void err(vector<string>::iterator it,T a,Args...args) {
    cout<<it->substr((*it)[0]==' ',it->length())<< " = " << a << " ";
    err(++it,args...);
}
///This DEBUGGER-tool need c++11///
#define     Int         Int()
#define     Long        Long()
#define     pii         pair<int,int>
#define     ff          first
#define     ss          second
#define     pb            push_back
#define     eb            emplace_back
#define     all(x)      x.begin(),x.end()
#define     mem(a)      memset(a,0,sizeof a)
#define     memn(a)     memset(a,-1,sizeof a)

set < int > g[N] ;
int deg[N] , vis[N];

int main() {
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int t = 1 , tc = 0 ;
    while(t--) {
        int n = Int , m = Int ;
        if(m & 1)return puts("No solution") , 0 ;
        for(int i = 1 ; i <= m ; i++){
            int x = Int , y = Int ;
            g[x].insert(y);
            g[y].insert(x);
            deg[x]++ , deg[y]++ ;
        }
        queue < int > odd , even ;
        for(int i = 1 ; i <= n ; i++){
            if(deg[i] & 1)odd.push(i) ;
            else {even.push(i) ;}
        }
        if(even.empty()){
            while(1){
                int v = odd.front() ;
                odd.pop() ;
                if(deg[v] > 1){even.push(v); break ;}
                else odd.push(v);
            }
        }
        while(!even.empty()){
            int u = even.front() ;
            //error(u , g[u].size())
            even.pop() ;
            vis[u] = 1 ;
            while((int)g[u].size() >= 2){
                auto i = g[u].begin() ;
                g[u].erase(*i) ;
                g[*i].erase(u) ;
                auto j = g[u].begin() ;
                g[u].erase(*j) ;
                g[*j].erase(u) ;
                deg[u] -= 2 ;
                deg[*i]-- , deg[*j]--;
                printf("%d %d %d\n",*i , u , *j);
                if(deg[*i] % 2 == 0 and deg[*i])even.push(*i) ;
                if(deg[*j] % 2 == 0 and deg[*j])even.push(*j) ;
                //error(deg[u] , deg[*i] , deg[*j] , u , *i , *j)
            }
            if(deg[u] & 1)odd.push(u) ;
            //error(u , g[u].size())
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5 ;
const double eps = 1e-9 ;
const int MAX_N = 1e6 + 5 ;
const long long M = (long long)1e9+7 ;
#define     ll      long long
#define     ull     unsigned long long
int Int() {
    int x;
    scanf("%d",&x);
    return x;
}
ll Long() {
    ll x;
    scanf("%lld",&x);
    return x;
}
void Char(char* ch) {
    scanf("%s",ch);
}
template<typename t>inline t abs(t a) { if(a>=0) return a; return -a;}
template<typename t>inline t gcd(t a , t b) {return !b ? a : gcd(b , a % b);}
template<typename t>inline t lcm(t a , t b) {return a * ( b /gcd(a , b));}
template<typename T>inline T modpow(T b, T p, T Mod) {
    T res  = 1;
    while(p) {
        if(p&1) {
            res *= b ;
            res %= Mod ;
        }
        b *= b;
        b %= Mod;
        p >>= 1;
    }
    return res ;
}

template<typename T> inline T ModInv(T b, T Mod) {return modpow(b, Mod - 2, Mod );}

template<typename T> inline T pwr(T b, T p) {
    T res  = 1;
    while(p) {
        if(p&1) {
            res *= b ;
        }
        b *= b;
        p >>= 1;
    }
    return res ;
}
int e1 , e2 , d1 ;
template < typename T >inline void extgcd(T a , T b){
    if(!b) {e1 = 1 , e2 = 0 , d1 = a ; return ;}
    extgcd(b , a % b) ;
    T x1 = e2 ;
    T y1 = e1 - (a / b) * e2 ;
    e1 = x1 ;
    e2 = y1 ;
}

/*primes in range 1 - n
1 - 100(1e2) -> 25 pimes
1 - 1000(1e3) -> 168 primes
1 - 10000(1e4) -> 1229 primes
1 - 100000(1e5) -> 9592 primes
1 - 1000000(1e6) -> 78498 primes
1 - 10000000(1e7) -> 664579 primes
large primes ->
104729 1299709 15485863 179424673 2147483647 32416190071 112272535095293 48112959837082048697
*/
/*
std::vector<int> primes;
bitset < MAX_N > bs;
ll sieve_size = MAX_N ;

void sieve(ll n){
    bs.set() ;
    bs[0] = bs[1] = 1 ;
    for(ll i = 2 ; i <= n ; i++)if(bs[i]){
        for(ll j = i * i ; j <= n ; j += i) bs[j] = 0 ;
            primes.push_back((int)i);
    }
}

bool isprime(ll n){
    if(n <= sieve_size)return bs[n] ;
    for(int i = 0 ; i <= (int)primes.size() ; i++){
        if(n % primes[i] == 0)return false ;
    }
    return true ;
}

int numDiffPf[MAX_N] ;

void DiffPF(){
    for(int i = 2 ; i < MAX_N ; i++){
        if(numDiffPf[i] == 0){
            for(int j = i ; j < MAX_N ; j += i)numDiffPf[j]++;
        }
    }
}

int Phi[MAX_N] ;

void EulerPHI(){
    for(int i = 1 ; i < MAX_N ; i++)Phi[i] = i ;
        for(int i = 2 ; i < MAX_N ; i++)
            if(Phi[i] == i)
                for(int j = i ; j < MAX_N ; j += i)
                    Phi[j] = (Phi[j]/i) * (i - 1) ;
}

int F(int x){
    return 0 ;
}
pair < int , int > floydCycle(int x0){
    int tor = F(x0) , hare = F(F(x0)) ;
    while(tor != hare){tor = F(tor) , hare = F(F(hare));}
    int mu = 0 ; hare = x0 ;
    while(tor != hare){tor = F(tor) , hare = F(hare); mu++ ;}
    int lambda = 1 ; hare = F(tor) ;
    while(tor != hare){hare = F(hare) ; lambda++;}
    return {mu , lambda} ;
}
*/
template <typename T>inline vector< T > Unique(vector< T > v) {
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()),v.end());
    return v;
}
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
///error///
#define error(args...) {vector<string>_v=split(#args,',');err(_v.begin(),args);cout<<endl;}
vector<string> split(const string &s,char c) {
    vector<string>v;
    stringstream ss(s);
    string x;
    while(getline(ss,x,c))
        v.emplace_back(x);
    return move(v);
}

void err(vector<string>::iterator it) {}
template<typename T,typename... Args>
void err(vector<string>::iterator it,T a,Args...args) {
    cout<<it->substr((*it)[0]==' ',it->length())<< " = " << a << " ";
    err(++it,args...);
}
///This DEBUGGER-tool need c++11///
#define     Int         Int()
#define     Long        Long()
#define     pii         pair<int,int>
#define     ff          first
#define     ss          second
#define     pb            push_back
#define     eb            emplace_back
#define     all(x)      x.begin(),x.end()
#define     mem(a)      memset(a,0,sizeof a)
#define     memn(a)     memset(a,-1,sizeof a)

set < int > g[N] ;
int deg[N] , vis[N];

int main() {
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int t = 1 , tc = 0 ;
    while(t--) {
        int n = Int , m = Int ;
        if(m & 1)return puts("No solution") , 0 ;
        for(int i = 1 ; i <= m ; i++){
            int x = Int , y = Int ;
            g[x].insert(y);
            g[y].insert(x);
            deg[x]++ , deg[y]++ ;
        }
        queue < int > even , odd;
        for(int i = 1 ; i <= n ; i++){
            if(deg[i] & 1)odd.push(i) ;
            else {even.push(i) ;}
        }
        if(even.empty()){
            while(1){
                int v = odd.front() ;
                odd.pop() ;
                if(deg[v] > 1){even.push(v); break ;}
                else odd.push(v);
            }
        }
        while(!even.empty()){
            int u = even.front() ;
            //error(u , g[u].size())
            even.pop() ;
            vis[u] = 1 ;
            while((int)g[u].size() >= 2){
                auto i = g[u].begin() ;
                g[u].erase(*i) ;
                g[*i].erase(u) ;
                auto j = g[u].begin() ;
                g[u].erase(*j) ;
                g[*j].erase(u) ;
                deg[u] -= 2 ;
                deg[*i]-- , deg[*j]--;
                printf("%d %d %d\n",*i , u , *j);
                if(deg[*i] % 2 == 0 and deg[*i])even.push(*i) ;
                if(deg[*j] % 2 == 0 and deg[*j])even.push(*j) ;
                //error(deg[u] , deg[*i] , deg[*j] , u , *i , *j)
            }
            //error(u , g[u].size())
        }
    }
    return 0;
}
/*
8 12
1 2
1 3
1 4
2 3
2 4
3 4
4 5
4 6
5 6
5 7
6 7
7 8
*/


#include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5 ;
const double eps = 1e-9 ;
const int MAX_N = 1e6 + 5 ;
const long long M = (long long)1e9+7 ;
#define     ll      long long
#define     ull     unsigned long long
int Int() {
    int x;
    scanf("%d",&x);
    return x;
}
ll Long() {
    ll x;
    scanf("%lld",&x);
    return x;
}
void Char(char* ch) {
    scanf("%s",ch);
}
template<typename t>inline t abs(t a) { if(a>=0) return a; return -a;}
template<typename t>inline t gcd(t a , t b) {return !b ? a : gcd(b , a % b);}
template<typename t>inline t lcm(t a , t b) {return a * ( b /gcd(a , b));}
template<typename T>inline T modpow(T b, T p, T Mod) {
    T res  = 1;
    while(p) {
        if(p&1) {
            res *= b ;
            res %= Mod ;
        }
        b *= b;
        b %= Mod;
        p >>= 1;
    }
    return res ;
}

template<typename T> inline T ModInv(T b, T Mod) {return modpow(b, Mod - 2, Mod );}

template<typename T> inline T pwr(T b, T p) {
    T res  = 1;
    while(p) {
        if(p&1) {
            res *= b ;
        }
        b *= b;
        p >>= 1;
    }
    return res ;
}
int e1 , e2 , d1 ;
template < typename T >inline void extgcd(T a , T b){
    if(!b) {e1 = 1 , e2 = 0 , d1 = a ; return ;}
    extgcd(b , a % b) ;
    T x1 = e2 ;
    T y1 = e1 - (a / b) * e2 ;
    e1 = x1 ;
    e2 = y1 ;
}

/*primes in range 1 - n
1 - 100(1e2) -> 25 pimes
1 - 1000(1e3) -> 168 primes
1 - 10000(1e4) -> 1229 primes
1 - 100000(1e5) -> 9592 primes
1 - 1000000(1e6) -> 78498 primes
1 - 10000000(1e7) -> 664579 primes
large primes ->
104729 1299709 15485863 179424673 2147483647 32416190071 112272535095293 48112959837082048697
*/
/*
std::vector<int> primes;
bitset < MAX_N > bs;
ll sieve_size = MAX_N ;

void sieve(ll n){
    bs.set() ;
    bs[0] = bs[1] = 1 ;
    for(ll i = 2 ; i <= n ; i++)if(bs[i]){
        for(ll j = i * i ; j <= n ; j += i) bs[j] = 0 ;
            primes.push_back((int)i);
    }
}

bool isprime(ll n){
    if(n <= sieve_size)return bs[n] ;
    for(int i = 0 ; i <= (int)primes.size() ; i++){
        if(n % primes[i] == 0)return false ;
    }
    return true ;
}

int numDiffPf[MAX_N] ;

void DiffPF(){
    for(int i = 2 ; i < MAX_N ; i++){
        if(numDiffPf[i] == 0){
            for(int j = i ; j < MAX_N ; j += i)numDiffPf[j]++;
        }
    }
}

int Phi[MAX_N] ;

void EulerPHI(){
    for(int i = 1 ; i < MAX_N ; i++)Phi[i] = i ;
        for(int i = 2 ; i < MAX_N ; i++)
            if(Phi[i] == i)
                for(int j = i ; j < MAX_N ; j += i)
                    Phi[j] = (Phi[j]/i) * (i - 1) ;
}

int F(int x){
    return 0 ;
}
pair < int , int > floydCycle(int x0){
    int tor = F(x0) , hare = F(F(x0)) ;
    while(tor != hare){tor = F(tor) , hare = F(F(hare));}
    int mu = 0 ; hare = x0 ;
    while(tor != hare){tor = F(tor) , hare = F(hare); mu++ ;}
    int lambda = 1 ; hare = F(tor) ;
    while(tor != hare){hare = F(hare) ; lambda++;}
    return {mu , lambda} ;
}
*/
template <typename T>inline vector< T > Unique(vector< T > v) {
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()),v.end());
    return v;
}
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
///error///
#define error(args...) {vector<string>_v=split(#args,',');err(_v.begin(),args);cout<<endl;}
vector<string> split(const string &s,char c) {
    vector<string>v;
    stringstream ss(s);
    string x;
    while(getline(ss,x,c))
        v.emplace_back(x);
    return move(v);
}

void err(vector<string>::iterator it) {}
template<typename T,typename... Args>
void err(vector<string>::iterator it,T a,Args...args) {
    cout<<it->substr((*it)[0]==' ',it->length())<< " = " << a << " ";
    err(++it,args...);
}
///This DEBUGGER-tool need c++11///
#define     Int         Int()
#define     Long        Long()
#define     pii         pair<int,int>
#define     ff          first
#define     ss          second
#define     pb            push_back
#define     eb            emplace_back
#define     all(x)      x.begin(),x.end()
#define     mem(a)      memset(a,0,sizeof a)
#define     memn(a)     memset(a,-1,sizeof a)

int vis[N] , print[N];
std::vector< pii > g[N];

void dfs(int s , int edge = 0 , int  p = 0){
    vector< pii > pending ;
    for(auto i : g[s]){
        if(!vis[i.ss]){
            vis[i.ss] = 1 ;
            dfs(i.ff , i.ss , s) ;
            if(!print[i.ss]){
                pending.pb({i.ff , i.ss }) ;
            }
            if(pending.size() == 2){
                printf("%d %d %d\n",pending[0].ff , s , pending[1].ff);
                print[pending[0].ss] = print[pending[1].ss] = 1 ;
                pending.clear() ;
            }
        }
    }
    if(pending.size()){
        printf("%d %d %d\n",pending[0].ff , s , p);
        print[edge] = print[pending[0].ss] = 1 ;
        pending.clear() ;
    }
}

int main() {
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int t = 1 , tc = 0 ;
    while(t--) {
        int n = Int , m = Int ;
        if(m & 1)return puts("No solution") , 0 ;
        for(int i = 1 ; i <= m ; i++){
            int x = Int , y = Int ;
            g[x].pb({y , i}) ;
            g[y].pb({x , i}) ;
        }
        dfs(1);
    }
    return 0;
}
/*
8 12
1 2
1 3
1 4
2 3
2 4
3 4
4 5
4 6
5 6
5 7
6 7
7 8
*/


#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef long double ld;
typedef map<pii,set<pii> >::iterator mapit;
typedef multiset<ll>::iterator setit;

const int maxn = 2e5 + 5;
const int maxlog = 22;
const ll mod = 1e9 + 7;
const int sq = 340;
const int inf = 1e9 + 43;
const ld pi = 3.14159265;
vector<int> adj[maxn];
int id[maxn] , depth[maxn];
bool mark[maxn];
struct S{
    int x , y , z;
};
vector<S> ans;
void dfs(int v){
    mark[v] = true ;
    for(int i = 0 ; i < adj[v].size() ; i ++ ){
        int u = adj[v][i];
        if(mark[u]) continue ;
        depth[u] = depth[v] + 1;
        dfs(u);
    }
    vector<int> vec;
    for(int i = 0 ; i < adj[v].size() ; i ++ ){
        int u = adj[v][i];
        if(depth[u] > depth[v]){
            if(id[u]){
                ans.pb({v , u , id[u]});
                id[u] = 0;
            }
            else{
                vec.pb(u);
            }
        }
    }
    if(vec.size() % 2 == 1){
        int u = vec.back();
        id[v] = u;
        vec.pop_back();
    }
    for(int i = 0 ; i < vec.size() ; i += 2){
        int u = vec[i];
        int w = vec[i + 1];
        ans.pb({u , v , w});
    }
}
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n , m;
    cin >> n >> m;
    for(int i = 0 ; i < m ; i ++ ){
        int u , v;
        cin >> u >> v;
        adj[u].pb(v);
        adj[v].pb(u);
    }
    if(m & 1){
        cout << "No solution";
        return 0;
    }
    for(int i = 1 ; i <= n ; i ++ ){
        if(!mark[i]){
            dfs(i);
        }
    }
    //cout << ans.size() << endl;
    for(int i = 0 ; i < ans.size() ; i ++ ){
        cout << ans[i].x << " " << ans[i].y << " " << ans[i].z << endl;
    }
    return 0;
}


////////////////////////////////////////////
///                                      ///
///         Template ver. 1 rapel        ///
/// Fear is Temporary, Regret is Forever ///
///          Must Try and Get AC         ///
///                                      ///
////////////////////////////////////////////
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <iomanip>

#include <algorithm>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>

#include <math.h>
#include <complex>

#include <assert.h>
#include <time.h>
//#include <chrono>
//#include <random>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <bitset>
#include <unordered_map>

#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define PF push_front
#define POB pop_back
#define POF pop_front
#define endl '\n'
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

void desperate_optimization(int precision){
  	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  	cout.setf(ios::fixed);
  	cout.setf(ios::showpoint);
  	cout.precision(precision);
}

unordered_map<pair<int,int>,int> ms;
const int N = 1e5;
vector<int> vec[N + 5];

int dfs(int idx) {
	vector<int> dummy;
	for(int i = 0;i < vec[idx].size();i++){
		int nx = vec[idx][i];
		if(ms[{min(idx,nx),max(idx,nx)}] == 0) dummy.PB(nx);
		ms[{min(idx,nx),max(idx,nx)}] = 1;
	}
	queue<int> q;
	for(int i = 0;i < dummy.size();i++) {
		int nx = dummy[i];
		int res = dfs(nx);
		if(res != 0) {
			printf("%d %d %d\n",idx,nx,res);
		}
		else {
			q.push(nx);
		}
	}
	while(q.size() >= 2) {
		int u = q.front(); q.pop();
		int v = q.front(); q.pop();
		printf("%d %d %d\n",u,idx,v);
	}
	if(q.size()) return q.front();
	return 0;
}

void hora(int tc) {
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i = 0;i < m;i++) {
		int u,v;
		scanf("%d%d",&u,&v);
		vec[u].PB(v);
		vec[v].PB(u);
	}
	if(m % 2 == 1) {
		printf("No solution\n");
		return ;
	}
	dfs(1);

}

int main(){
	//desperate_optimization(10);
	int ntc = 1;
	//cin>>ntc;
	for(int tc = 1;tc <= ntc;tc++) hora(tc);
	return 0;
}


////////////////////////////////////////////
///                                      ///
///         Template ver. 1 rapel        ///
/// Fear is Temporary, Regret is Forever ///
///          Must Try and Get AC         ///
///                                      ///
////////////////////////////////////////////
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <iomanip>

#include <algorithm>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>

#include <math.h>
#include <complex>

#include <assert.h>
#include <time.h>
//#include <chrono>
//#include <random>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <bitset>

#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define PF push_front
#define POB pop_back
#define POF pop_front
#define endl '\n'
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

void desperate_optimization(int precision){
  	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  	cout.setf(ios::fixed);
  	cout.setf(ios::showpoint);
  	cout.precision(precision);
}

map<pair<int,int>,int> ms;
const int N = 1e5;
vector<int> vec[N + 5];

int dfs(int idx) {
	vector<int> dummy;
	for(int i = 0;i < vec[idx].size();i++){
		int nx = vec[idx][i];
		if(ms[{min(idx,nx),max(idx,nx)}] == 0) dummy.PB(nx);
		ms[{min(idx,nx),max(idx,nx)}] = 1;
	}
	queue<int> q;
	for(int i = 0;i < dummy.size();i++) {
		int nx = dummy[i];
		int res = dfs(nx);
		if(res != 0) {
			printf("%d %d %d\n",idx,nx,res);
		}
		else {
			q.push(nx);
		}
	}
	while(q.size() >= 2) {
		int u = q.front(); q.pop();
		int v = q.front(); q.pop();
		printf("%d %d %d\n",u,idx,v);
	}
	if(q.size()) return q.front();
	return 0;
}

void hora(int tc) {
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i = 0;i < m;i++) {
		int u,v;
		scanf("%d%d",&u,&v);
		vec[u].PB(v);
		vec[v].PB(u);
	}
	if(m % 2 == 1) {
		printf("No solution\n");
		return ;
	}
	dfs(1);

}

int main(){
	//desperate_optimization(10);
	int ntc = 1;
	//cin>>ntc;
	for(int tc = 1;tc <= ntc;tc++) hora(tc);
	return 0;
}


////////////////////////////////////////////
///                                      ///
///         Template ver. 1 rapel        ///
/// Fear is Temporary, Regret is Forever ///
///          Must Try and Get AC         ///
///                                      ///
////////////////////////////////////////////
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <iomanip>

#include <algorithm>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>

#include <math.h>
#include <complex>

#include <assert.h>
#include <time.h>
//#include <chrono>
//#include <random>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <bitset>
#include <unordered_map>

#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define PF push_front
#define POB pop_back
#define POF pop_front
#define endl '\n'
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

void desperate_optimization(int precision){
  	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  	cout.setf(ios::fixed);
  	cout.setf(ios::showpoint);
  	cout.precision(precision);
}

unordered_map<LL,int> ms;
const int N = 1e5;
vector<int> vec[N + 5];

int dfs(int idx) {
	vector<int> dummy;
	for(int i = 0;i < vec[idx].size();i++){
		int nx = vec[idx][i];
		if(ms[1LL * max(idx,nx) * 1e6 + min(idx,nx)] == 0) dummy.PB(nx);
		ms[1LL * max(idx,nx) * 1e6 + min(idx,nx)] = 1;
	}
	queue<int> q;
	for(int i = 0;i < dummy.size();i++) {
		int nx = dummy[i];
		int res = dfs(nx);
		if(res != 0) {
			printf("%d %d %d\n",idx,nx,res);
		}
		else {
			q.push(nx);
		}
	}
	while(q.size() >= 2) {
		int u = q.front(); q.pop();
		int v = q.front(); q.pop();
		printf("%d %d %d\n",u,idx,v);
	}
	if(q.size()) return q.front();
	return 0;
}

void hora(int tc) {
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i = 0;i < m;i++) {
		int u,v;
		scanf("%d%d",&u,&v);
		vec[u].PB(v);
		vec[v].PB(u);
	}
	if(m % 2 == 1) {
		printf("No solution\n");
		return ;
	}
	dfs(1);

}

int main(){
	//desperate_optimization(10);
	int ntc = 1;
	//cin>>ntc;
	for(int tc = 1;tc <= ntc;tc++) hora(tc);
	return 0;
}


////////////////////////////////////////////
///                                      ///
///         Template ver. 1 rapel        ///
/// Fear is Temporary, Regret is Forever ///
///          Must Try and Get AC         ///
///                                      ///
////////////////////////////////////////////
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <iomanip>

#include <algorithm>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>

#include <math.h>
#include <complex>

#include <assert.h>
#include <time.h>
//#include <chrono>
//#include <random>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <bitset>

#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define PF push_front
#define POB pop_back
#define POF pop_front
#define endl '\n'
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

void desperate_optimization(int precision){
  	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  	cout.setf(ios::fixed);
  	cout.setf(ios::showpoint);
  	cout.precision(precision);
}

map<pair<int,int>,int> ms;
const int N = 1e5;
vector<int> vec[N + 5];

int dfs(int idx) {
	vector<int> dummy;
	for(int i = 0;i < vec[idx].size();i++){
		int nx = vec[idx][i];
		if(ms[{min(idx,nx),max(idx,nx)}] == 0) dummy.PB(nx);
		ms[{min(idx,nx),max(idx,nx)}] = 1;
	}
	queue<int> q;
	for(int i = 0;i < dummy.size();i++) {
		int nx = dummy[i];
		int res = dfs(nx);
		if(res != 0) {
			cout<<idx<<" "<<nx<<" "<<res<<endl;
		}
		else {
			q.push(nx);
		}
	}
	while(q.size() >= 2) {
		int u = q.front(); q.pop();
		int v = q.front(); q.pop();
		cout<<u<<" "<<idx<<" "<<v<<endl;
	}
	if(q.size()) return q.front();
	return 0;
}

void hora(int tc) {
	int n,m;
	cin>>n>>m;
	for(int i = 0;i < m;i++) {
		int u,v;
		cin>>u>>v;
		vec[u].PB(v);
		vec[v].PB(u);
	}
	if(m % 2 == 1) {
		cout<<"No solution"<<endl;
		return ;
	}
	dfs(1);

}

int main(){
	desperate_optimization(10);
	int ntc = 1;
	//cin>>ntc;
	for(int tc = 1;tc <= ntc;tc++) hora(tc);
	return 0;
}


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp> // Including seg_tree_order_statistics_node_update
#include <stdio.h>
#include <cassert>
using namespace std;
//using namespace __gnu_pbds;
typedef long long  lo;
typedef long double ld;
typedef pair<lo,lo> ll;//pair
typedef vector<lo> vl;  //vector of long
typedef vector<ll > vll;   //vector of pair
typedef priority_queue<lo>p_q;
typedef vector< vl > vvl;  //vector of vectors
#define X first
#define Y second
#define mp(a,b) make_pair((a),(b))
#define REP(a,b) for(lo i=(a);i<(lo)b;i++)//no need to declare variable i
#define REPE(a,b,c,d) REP(a,b)for(lo j=(c);j<(lo)d;j++)//no need to declare vaiables i,j
#define REPV(a,b,c) for(lo(a)=b;(a)<(c);(a)++)//a is the variable
#define IREP(a,b) for(lo i=(a);i>=(b);i--)
#define IREPV(a,b,c) for(lo(a)=b;(a)>=(c);(a)--)
#define all(v) (v).begin(),(v).end()
#define TRV(a) for(auto &it : a)
#define INF 111000
#define MOD 1000000007
#define M 1000000007
#define BLOCK 300
#define CHECK_BIT(var,pos) ((var) & (1<<(pos)))
#define pb(a) push_back((a))
#define eps 1e-8
#define PI acos(-1.0)
#define debug(x) cout<<#x<<"="<<x<<endl
#define debug2(x,y) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<endl;
#define debug3(x,y,z) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<endl;
#define debug4(x,y,z,w) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<" "<<#w<<"="<<w<<endl;
#define debug5(x,y,z,w,t) cout<<#x<<"="<<x <<" ";debug4(y,z,w,t);
#define debug6(p,x,y,z,w,t) cout<<#p<<" "<<p<<" "<<#x<<"="<<x <<" ";debug4(y,z,w,t);
#define debug7(o,p,x,y,z,w,t) cout<<#o<<" "<<o<<" ";debug6(p,x,y,z,w,t);
#define print_matrix(a,n,m) REPE(0,n,0,m){cout<<(a)[i][j]<<((j==m-1)?'\n':' ');}
#define endl "\n"
template<typename T> ostream& operator<< ( ostream &o,vector<T> v ) {
    if ( v.size() >0 )o<<v[0];
    for ( unsigned   i=1; i<v.size(); i++ )o<<" "<<v[i];
    return o<<endl;
}
template<typename U,typename V> ostream& operator<< ( ostream &o,pair<U,V> p ) {
    return o<<"("<<p.first<<", "<<p.second<<") ";
}
template<typename T> istream& operator>> ( istream &in,vector<T> &v ) {
    for ( unsigned   i=0; i<v.size(); i++ )in>>v[i];
    return in;
}
template<typename T> istream& operator>> ( istream &in,pair <T,T> &p ) {
    in>>p.X;
    in>>p.Y;
    return in;
}
vvl g(INF);
vl ind(INF,0),vis(INF,false);
lo c=0;
bool rec(lo node,lo p){
	vl ch;
	ind[node]=c++;
	vis[node]=1;
	TRV(g[node]){
	    if(it==p)continue;
        if(!vis[it]){
            if(!rec(it,node))ch.pb(it);
        }
        else if(ind[node]<ind[it])ch.pb(it);
	}
    for(lo i=0;i+1<ch.size();i+=2)cout<<ch[i]<<" "<<node<<" "<<ch[i+1]<<endl;
    if(ch.size()%2==1){
        cout<<p<<" "<<node<<" "<<ch[ch.size()-1]<<endl;
        return true;
    }
	return false;
}
int main(){
    //std::ios::sync_with_stdio(false);
	//cin.tie(0);cout.tie(0);cout.precision(20);
	lo n,m;
	cin>>n>>m;
	if(m%2==1){
        cout<<"No Solution"<<endl;
        return 0;
	}
	while(m--){
        lo x,y;
        cin>>x>>y;
        g[x].pb(y);
        g[y].pb(x);
	}
	rec(1,-1);
	return 0;
}


#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp> // Including seg_tree_order_statistics_node_update
#include <stdio.h>
#include <cassert>
using namespace std;
//using namespace __gnu_pbds;
typedef long long  lo;
typedef long double ld;
typedef pair<lo,lo> ll;//pair
typedef vector<lo> vl;  //vector of long
typedef vector<ll > vll;   //vector of pair
typedef priority_queue<lo>p_q;
typedef vector< vl > vvl;  //vector of vectors
#define X first
#define Y second
#define mp(a,b) make_pair((a),(b))
#define REP(a,b) for(lo i=(a);i<(lo)b;i++)//no need to declare variable i
#define REPE(a,b,c,d) REP(a,b)for(lo j=(c);j<(lo)d;j++)//no need to declare vaiables i,j
#define REPV(a,b,c) for(lo(a)=b;(a)<(c);(a)++)//a is the variable
#define IREP(a,b) for(lo i=(a);i>=(b);i--)
#define IREPV(a,b,c) for(lo(a)=b;(a)>=(c);(a)--)
#define all(v) (v).begin(),(v).end()
#define TRV(a) for(auto &it : a)
#define INF 111000
#define MOD 1000000007
#define M 1000000007
#define BLOCK 300
#define CHECK_BIT(var,pos) ((var) & (1<<(pos)))
#define pb(a) push_back((a))
#define eps 1e-8
#define PI acos(-1.0)
#define debug(x) cout<<#x<<"="<<x<<endl
#define debug2(x,y) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<endl;
#define debug3(x,y,z) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<endl;
#define debug4(x,y,z,w) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<" "<<#w<<"="<<w<<endl;
#define debug5(x,y,z,w,t) cout<<#x<<"="<<x <<" ";debug4(y,z,w,t);
#define debug6(p,x,y,z,w,t) cout<<#p<<" "<<p<<" "<<#x<<"="<<x <<" ";debug4(y,z,w,t);
#define debug7(o,p,x,y,z,w,t) cout<<#o<<" "<<o<<" ";debug6(p,x,y,z,w,t);
#define print_matrix(a,n,m) REPE(0,n,0,m){cout<<(a)[i][j]<<((j==m-1)?'\n':' ');}
#define endl "\n"
template<typename T> ostream& operator<< ( ostream &o,vector<T> v ) {
    if ( v.size() >0 )o<<v[0];
    for ( unsigned   i=1; i<v.size(); i++ )o<<" "<<v[i];
    return o<<endl;
}
template<typename U,typename V> ostream& operator<< ( ostream &o,pair<U,V> p ) {
    return o<<"("<<p.first<<", "<<p.second<<") ";
}
template<typename T> istream& operator>> ( istream &in,vector<T> &v ) {
    for ( unsigned   i=0; i<v.size(); i++ )in>>v[i];
    return in;
}
template<typename T> istream& operator>> ( istream &in,pair <T,T> &p ) {
    in>>p.X;
    in>>p.Y;
    return in;
}
vvl g(INF);
vl ind(INF,0),vis(INF,false);
lo c=0;
bool rec(lo node,lo p){
	vl ch;
	ind[node]=c++;
	vis[node]=1;
	TRV(g[node]){
	    if(it==p)continue;
        if(!vis[it]){
            if(!rec(it,node))ch.pb(it);
        }
        else if(ind[node]<ind[it])ch.pb(it);
	}
    for(lo i=0;i+1<ch.size();i+=2)cout<<ch[i]<<" "<<node<<" "<<ch[i+1]<<endl;
    if(ch.size()%2==1){
        cout<<p<<" "<<node<<" "<<ch[ch.size()-1]<<endl;
        return true;
    }
	return false;
}
int main(){
    //std::ios::sync_with_stdio(false);
	//cin.tie(0);cout.tie(0);cout.precision(20);
	lo n,m;
	cin>>n>>m;
	if(m%2==1){
        cout<<"No solution"<<endl;
        return 0;
	}
	while(m--){
        lo x,y;
        cin>>x>>y;
        g[x].pb(y);
        g[y].pb(x);
	}
	rec(1,-1);
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <iomanip>
#include <stack>
#include <string>
#include <set>
#include <queue>
#include <functional>
#include <deque>
#include <cmath>
#include <sstream>
#include <bitset>

using namespace std;

#define forn(i,n) for(int i = 0; i < n; i++)
#define forr(i,n) for(int i = n-1; i >= 0; i++)
#define ALL(x) x.begin(),x.end()
#define mp(x,y) make_pair(x,y)
#define lson x*2, l, m
#define rson x*2+1, m+1, r
#define sf(x,y) scanf("%" x,&y)
#define pf(x,y) printf("%" x,y)

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;
typedef vector<int> vint;
typedef vector<int64> vint64;
typedef long double float64;
template <typename T1, typename T2> istream& operator >> (istream& in, pair<T1, T2>& t) { return in >> t.first >> t.second; }
template <typename T1, typename T2> ostream& operator << (ostream& out, pair<T1, T2>& t) { return out << t.first << " " << t.second << endl; }
template <typename T> istream& operator >> (istream& in, vector<T>& t) { for (int i = 0; i < t.size(); i++) in >> t[i]; return in; }
template <typename T> ostream& operator << (ostream& out, vector<T>& t) { for (int i = 0; i < t.size(); i++) out << t[i] << " "; return out; }

vector<int> is;

vector<vector<int>> ans;

struct G
{
	vector<pii> to;
};

vector<G> g;

void dfs1(int v)
{
	for (int i = 0; i < g[v].to.size(); i++)
	{
		auto& t = g[v].to;
		if (is[t[i].second])continue;
		for (int j = i + 1; j < t.size(); j++)
		{
			if (is[g[v].to[j].second])continue;
			ans.push_back({ t[i].first, v, t[j].first });
			is[t[i].second] = 1;
			is[t[j].second] = 1;
			break;
		}
	}
}

int main()
{
#ifdef _SANYA
	freopen("abc.txt", "r", stdin);
#else
#define T "permutation"
	//freopen(T ".in", "r", stdin);
	//freopen(T ".out", "w", stdout);
#endif
	int n, m; sf("d", n); sf("d", m);
	g.resize(n); is.resize(m);
	for (int i = 0; i < m; i++)
	{
		int a, b; sf("d", a); sf("d", b); a--; b--;
		g[a].to.push_back(mp(b, i));
		g[b].to.push_back(mp(a, i));
	}
	for (int i = 0; i < n; i++)
	{
		dfs1(i);
	}
	for (int i : is)
	{
		if (i == 0)
		{
			puts("No solution");
			return 0;
		}
	}
	pf("d\n", (int)ans.size());
	for (int i = 0; i < ans.size(); i++)
	{
		printf("%d %d %d\n", ans[i][0] + 1, ans[i][1] + 1, ans[i][2] + 1);
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <iomanip>
#include <stack>
#include <string>
#include <set>
#include <queue>
#include <functional>
#include <deque>
#include <cmath>
#include <sstream>
#include <bitset>

using namespace std;

#define forn(i,n) for(int i = 0; i < n; i++)
#define forr(i,n) for(int i = n-1; i >= 0; i++)
#define ALL(x) x.begin(),x.end()
#define mp(x,y) make_pair(x,y)
#define lson x*2, l, m
#define rson x*2+1, m+1, r
#define sf(x,y) scanf("%" x,&y)
#define pf(x,y) printf("%" x,y)

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;
typedef vector<int> vint;
typedef vector<int64> vint64;
typedef long double float64;
template <typename T1, typename T2> istream& operator >> (istream& in, pair<T1, T2>& t) { return in >> t.first >> t.second; }
template <typename T1, typename T2> ostream& operator << (ostream& out, pair<T1, T2>& t) { return out << t.first << " " << t.second << endl; }
template <typename T> istream& operator >> (istream& in, vector<T>& t) { for (int i = 0; i < t.size(); i++) in >> t[i]; return in; }
template <typename T> ostream& operator << (ostream& out, vector<T>& t) { for (int i = 0; i < t.size(); i++) out << t[i] << " "; return out; }

vector<int> is;

vector<vector<int>> ans;

struct G
{
	vector<pii> to;
};

vector<G> g;

void dfs1(int v)
{
	for (int i = 0; i < g[v].to.size(); i++)
	{
		auto& t = g[v].to;
		if (is[t[i].second])continue;
		for (int j = i + 1; j < t.size(); j++)
		{
			if (is[g[v].to[j].second])continue;
			ans.push_back({ t[i].first, v, t[j].first });
			is[t[i].second] = 1;
			is[t[j].second] = 1;
			break;
		}
	}
}

int main()
{
#ifdef _SANYA
	freopen("abc.txt", "r", stdin);
#else
#define T "permutation"
	//freopen(T ".in", "r", stdin);
	//freopen(T ".out", "w", stdout);
#endif
	int n, m; sf("d", n); sf("d", m);
	g.resize(n); is.resize(m);
	for (int i = 0; i < m; i++)
	{
		int a, b; sf("d", a); sf("d", b); a--; b--;
		g[a].to.push_back(mp(b, i));
		g[b].to.push_back(mp(a, i));
	}
	for (int i = 0; i < n; i++)
	{
		dfs1(i);
	}
	for (int i : is)
	{
		if (i == 0)
		{
			puts("No solution");
			return 0;
		}
	}
	for (int i = 0; i < ans.size(); i++)
	{
		printf("%d %d %d\n", ans[i][0] + 1, ans[i][1] + 1, ans[i][2] + 1);
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <iomanip>
#include <stack>
#include <string>
#include <set>
#include <queue>
#include <functional>
#include <deque>
#include <cmath>
#include <sstream>
#include <bitset>

using namespace std;

#define forn(i,n) for(int i = 0; i < n; i++)
#define forr(i,n) for(int i = n-1; i >= 0; i++)
#define ALL(x) x.begin(),x.end()
#define mp(x,y) make_pair(x,y)
#define lson x*2, l, m
#define rson x*2+1, m+1, r
#define sf(x,y) scanf("%" x,&y)
#define pf(x,y) printf("%" x,y)

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;
typedef vector<int> vint;
typedef vector<int64> vint64;
typedef long double float64;
template <typename T1, typename T2> istream& operator >> (istream& in, pair<T1, T2>& t) { return in >> t.first >> t.second; }
template <typename T1, typename T2> ostream& operator << (ostream& out, pair<T1, T2>& t) { return out << t.first << " " << t.second << endl; }
template <typename T> istream& operator >> (istream& in, vector<T>& t) { for (int i = 0; i < t.size(); i++) in >> t[i]; return in; }
template <typename T> ostream& operator << (ostream& out, vector<T>& t) { for (int i = 0; i < t.size(); i++) out << t[i] << " "; return out; }

vector<int> is;

vector<vector<int>> answ;

struct G
{
	map<int, int> to;
};

vector<G> g;

int dfs1(int v, int p = -1)
{
	for (auto i : g[v].to)
	{
		g[i.first].to.erase(v);
	}
	int last = -1;
	for (auto it = g[v].to.begin();it!=g[v].to.end();)
	{
		auto& i = *it;
		int ans = dfs1(i.first, v);
		if (ans != -1) {
			answ.push_back({ v,i.first,ans });
			int t = i.first;
			g[i.first].to.erase(ans); g[v].to.erase(i.first);
			it = g[v].to.upper_bound(t);
			continue;
		}
		if (last == -1) { last = i.first; it++; }
		else {
			answ.push_back({ last,v,i.first });
			int t = i.first;
			g[v].to.erase(last); g[v].to.erase(i.first);
			it = g[v].to.upper_bound(t);
			last = -1;
			continue;
		}
	}
	return last;
}

int main()
{
#ifdef _SANYA
	freopen("abc.txt", "r", stdin);
#else
#define T "permutation"
	//freopen(T ".in", "r", stdin);
	//freopen(T ".out", "w", stdout);
#endif
	int n, m; sf("d", n); sf("d", m);
	g.resize(n); is.resize(m);
	for (int i = 0; i < m; i++)
	{
		int a, b; sf("d", a); sf("d", b); a--; b--;
		g[a].to[b] = i;
		g[b].to[a] = i;
	}

	if (dfs1(0) != -1)
	{
		puts("No solution");
		return 0;
	}
	for (int i = 0; i < answ.size(); i++)
	{
		printf("%d %d %d\n", answ[i][0] + 1, answ[i][1] + 1, answ[i][2] + 1);
	}
	return 0;
}


//In the name of Allah
#include <bits/stdc++.h>

using namespace std;

#define F first
#define S second
#define MP make_pair
#define PB push_back
#define int long long

const int N=1e6+100;
int n,m;
vector<pair<int,int> > a[N];
vector<pair<int,pair<int,int> > > ans;
bool mark[N],flag[N];

void dfs(int v,int p=-1,int idp=-1){
	mark[v]=true;

	int k=-1;

	for(int i=0,u,id;i<a[v].size();i++){
		u=a[v][i].F;id=a[v][i].S;
		if(u==p)continue;
		if(!mark[u]){
			dfs(u,v,id);
			if(flag[id])continue;
			flag[id]=true;
			if(k==-1){
				k=u;
				continue;
			}
			ans.PB(MP(k,MP(v,u)));
			k=-1;
		}else if(!flag[id]){
			flag[id]=true;
			if(k==-1){
				k=u;
				continue;
			}
			ans.PB(MP(k,MP(v,u)));
			k=-1;
		}
	}
	if(k!=-1){
		flag[idp]=true;
		ans.PB(MP(k,MP(v,p)));
	}
}

int32_t main(){
	ios::sync_with_stdio(0);cin.tie(0);
	cin>>n>>m;
	for(int i=0,u,v;i<m;i++){
		cin>>u>>v;
		u--;v--;
		a[u].PB(MP(v,i));
		a[v].PB(MP(u,i));
	}
	if(m%2==1)return cout<<"No solution\n",0;
	dfs(0);
	for(int i=0;i<ans.size();i++){
		cout<<ans[i].F+1<<" "<<ans[i].S.F+1<<" "<<ans[i].S.S+1<<"\n";
	}
	cout<<"\n";
	return 0;
}


#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

using ii = pair<int,int>;
using ll = long long;

const int N = 1e5 + 5;
const int mod = 1e9 + 7;
void kill(){cout << "No solution\n";exit(0);}
int n, m;
set<int>adj[N];
int dfs(int u){
	vector<int>out;
	while(adj[u].size()){
		int v = *adj[u].begin();
		adj[v].erase(u);
		adj[u].erase(v);
		int w = dfs(v);
		if(~w){
			cout << u << ' ' << v << ' ' << w << '\n';
		}	else {
			out.push_back(v);
		}
	}

	for(int i = out.size() & 1; i < out.size(); i+=2){
		cout << out[i] << ' ' << u << ' ' << out[i+1] << '\n';
	}
	if(out.size() & 1)return out[0];
	return -1;
}
int main(){
#ifdef ONLINE_JUDGE
	ios_base::sync_with_stdio(0);
	cin.tie(0);
#endif // ONLINE_JUDGE

	cin >> n >> m;

	if(m & 1){
		kill();
	}

	for(int i = 0, u, v; i < m; i++){
		cin >> u >> v;
		adj[u].insert(v);
		adj[v].insert(u);
	}

	dfs(1);

	return 0;
}


 #include<iostream>
#include<fstream>
#include<string>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
#include<set>
#include<bitset>
using namespace std;
bool r[1000];
vector<int> g[1000];
set<pair<int, int>> e;
vector<pair<pair<int, int>, int>> an;
int dfs(int u)
{
	vector<int> need;
	while (g[u].size())
	{
		int s = g[u][g[u].size() - 1];
		g[u].pop_back();
		if (e.count(make_pair(u, s)))
		{
			e.erase(make_pair(u, s));
			e.erase(make_pair(s, u));
			if (int n = dfs(s))
			{
				an.push_back(make_pair(make_pair(n, s), u));
			}
			else
			need.push_back(s);
		}

	}
	while (need.size() > 1)
	{
		int n1 = need[need.size() - 1];
		need.pop_back();
		int n2 = need[need.size() - 1];
		need.pop_back();
		an.push_back(make_pair(make_pair(n1, u), n2));
	}
	if (need.size())
	{
		int r = need.front();
		return r;
	}
	else
		return 0;

}

int main()
{

	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int x, y;
		cin >> x >> y;
		g[x].push_back(y);
		g[y].push_back(x);
		e.insert(make_pair(x, y));
		e.insert(make_pair(y, x));
	}

	int a=dfs(1);
	if (a == 0)
	{
		for (int i = 0; i < an.size(); i++)
			cout << an[i].first.first << " " << an[i].first.second << " " << an[i].second << endl;
	}
	else
		cout << " No solution";
	return 0;
}


 #include<iostream>
#include<fstream>
#include<string>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
#include<set>
#include<bitset>
using namespace std;
bool r[1000];
vector<int> g[1000];
set<pair<int, int>> e;
int dfs(int u)
{
	vector<int> need;
	while (g[u].size())
	{
		int s = g[u][g[u].size() - 1];
		g[u].pop_back();
		if (e.count(make_pair(u, s)))
		{
			e.erase(make_pair(u, s));
			e.erase(make_pair(s, u));
			if (int n = dfs(s))
			{
				cout << u << " " << s << " " << n<<endl;
			}
			else
			need.push_back(s);
		}

	}
	while (need.size() > 1)
	{
		int n1 = need[need.size() - 1];
		need.pop_back();
		int n2 = need[need.size() - 1];
		need.pop_back();
		cout << n1 << " " << u << " " << n2<<endl;
	}
	if (need.size())
	{
		int r = need.front();
		return r;
	}
	else
		return 0;

}

int main()
{

	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int x, y;
		cin >> x >> y;
		g[x].push_back(y);
		g[y].push_back(x);
		e.insert(make_pair(x, y));
		e.insert(make_pair(y, x));
	}

	dfs(1);
	return 0;
}


 #include<iostream>
#include<fstream>
#include<string>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
#include<set>
#include<bitset>
using namespace std;
bool r[1000];
vector<int> g[1000];
set<pair<int, int>> e;
int dfs(int u)
{
	vector<int> need;
	while (g[u].size())
	{
		int s = g[u][g[u].size() - 1];
		g[u].pop_back();
		if (e.count(make_pair(u, s)))
		{
			e.erase(make_pair(u, s));
			e.erase(make_pair(s, u));
			if (int n = dfs(s))
			{
				cout << u << " " << s << " " << n<<endl;
			}
			else
			need.push_back(s);
		}

	}
	while (need.size() > 1)
	{
		int n1 = need[need.size() - 1];
		need.pop_back();
		int n2 = need[need.size() - 1];
		need.pop_back();
		cout << n1 << " " << u << " " << n2<<endl;
	}
	if (need.size())
	{
		int r = need.front();
		return r;
	}
	else
		return 0;

}

int main()
{
	fstream cin("T.txt", ios::in);
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int x, y;
		cin >> x >> y;
		g[x].push_back(y);
		g[y].push_back(x);
		e.insert(make_pair(x, y));
		e.insert(make_pair(y, x));
	}

	dfs(1);
	return 0;
}


 #include<iostream>
#include<fstream>
#include<string>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
#include<set>
#include<bitset>
using namespace std;
bool r[1000];
vector<int> g[100001];
set<pair<int, int>> e;
vector<pair<pair<int, int>, int>> an;
int dfs(int u)
{
	vector<int> need;
	while (g[u].size())
	{
		int s = g[u][g[u].size() - 1];
		g[u].pop_back();
		if (e.count(make_pair(u, s)))
		{
			e.erase(make_pair(u, s));
			e.erase(make_pair(s, u));
			if (int n = dfs(s))
			{
				an.push_back(make_pair(make_pair(n, s), u));
			}
			else
			need.push_back(s);
		}

	}
	while (need.size() > 1)
	{
		int n1 = need[need.size() - 1];
		need.pop_back();
		int n2 = need[need.size() - 1];
		need.pop_back();
		an.push_back(make_pair(make_pair(n1, u), n2));
	}
	if (need.size())
	{
		int r = need.front();
		return r;
	}
	else
		return 0;

}

int main()
{

	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int x, y;
		cin >> x >> y;
		g[x].push_back(y);
		g[y].push_back(x);
		e.insert(make_pair(x, y));
		e.insert(make_pair(y, x));
	}

	int a=dfs(1);
	if (a == 0)
	{
		for (int i = 0; i < an.size(); i++)
			cout << an[i].first.first << " " << an[i].first.second << " " << an[i].second << endl;
	}
	else
		cout << "No solution";
	return 0;
}


 #include<iostream>
#include<fstream>
#include<string>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<cmath>
#include<set>
#include<bitset>
using namespace std;
bool r[1000];
vector<int> g[1000];
set<pair<int, int>> e;
vector<pair<pair<int, int>, int>> an;
int dfs(int u)
{
	vector<int> need;
	while (g[u].size())
	{
		int s = g[u][g[u].size() - 1];
		g[u].pop_back();
		if (e.count(make_pair(u, s)))
		{
			e.erase(make_pair(u, s));
			e.erase(make_pair(s, u));
			if (int n = dfs(s))
			{
				an.push_back(make_pair(make_pair(n, s), u));
			}
			else
			need.push_back(s);
		}

	}
	while (need.size() > 1)
	{
		int n1 = need[need.size() - 1];
		need.pop_back();
		int n2 = need[need.size() - 1];
		need.pop_back();
		an.push_back(make_pair(make_pair(n1, u), n2));
	}
	if (need.size())
	{
		int r = need.front();
		return r;
	}
	else
		return 0;

}

int main()
{

	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int x, y;
		cin >> x >> y;
		g[x].push_back(y);
		g[y].push_back(x);
		e.insert(make_pair(x, y));
		e.insert(make_pair(y, x));
	}

	int a=dfs(1);
	if (a == 0)
	{
		for (int i = 0; i < an.size(); i++)
			cout << an[i].first.first << " " << an[i].first.second << " " << an[i].second << endl;
	}
	else
		cout << "No solution";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lf long double
#define pi pair<int,int>
#define vi vector<int>

set<int> gph[100005];
int n,m;

int dfs(int x){
    vector<int> lis;
    while(gph[x].size()){
        int p=*gph[x].begin();
        gph[x].erase(p);
        gph[p].erase(x);
        int t=dfs(p);
        if(t!=-1){
            printf("%d %d %d\n",x,p,t);
        }
        else{
            lis.push_back(p);
        }
    }
    for(int i=lis.size()%2;i<lis.size();i+=2){
        printf("%d %d %d\n",lis[i],x,lis[i+1]);
    }
    if(lis.size()&1) return lis[0];
    return -1;
}

int main(){
    scanf("%d %d",&n,&m);
    if(m%2 == 1){
        puts("No solution");
        return 0;
    }
    for(int i=0;i<m;i++){
        int s,e;
        scanf("%d %d",&s,&e);
        gph[s].insert(e);
        gph[e].insert(s);
    }
    dfs(1);
}


#include<bits/stdc++.h>
using namespace std;
// VERRRRRRY  HARD  :(
#define pb push_back
#define ft front
#define pp pop_back
#define mp make_pair
#define fr first
#define sc second
#define sz(x) x.size()
#define all(x) x.begin() , x.end()
#define mem(x) memset(x,0,sizeof(x))
#define _ ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL);
typedef long long int ll;
typedef pair<int,int> pii;
const ll N=1e5+2;
const ll mod=1e9+7;

vector <int> g[N];
int h[N];
bool mark[N];

int dfs(int v, int pr){
    mark[v]=true;
    vector <int> c;     c.clear();
    for(int i=0; i<sz(g[v]); i++){
        int u= g[v][i];
        if (!mark[u]){
            h[u] = h[v] + 1;
            if (dfs(u, v) == 1) c.pb(u);
        }
        else if (u != pr && h[u] < h[v])   c.pb(u);
    }
    while(sz(c)>=2){
        int x=c.back(); c.pp();
        int y=c.back(); c.pp();
        cout<<x<<" "<<v<<" "<<y<<'\n';
    }
    if(!sz(c))  return 1;
    else    cout<<c[0]<<" "<<v<<" "<<pr<<'\n';  return 0;
}
int32_t main ()
{
    int n, m, a, b;
    cin>>n>>m;
    if(m%2) return cout<<"No solution",0;
    while (m--){
        cin>>a>>b;
        g[a].pb(b);
        g[b].pb(a);
    }
    dfs(1, 0);
    return EXIT_SUCCESS;
}
//514B
//515C
//552B
//746B


///Chefer

#include<bits/stdc++.h>
#define int long long int
#define f first
#define s second

using namespace std;

typedef pair<int,int> pii;
map <pii,int> mp;
const int maxn=1e5+5;
vector <int> v[maxn];
int h[maxn];
pii a[maxn];
bool mark[maxn];
bool b[maxn];
int p[maxn];
int ans[maxn];
vector<int> s[maxn];
void dfs(int x)
{
	//cerr<<x<<" "<<p[x]<<endl;
	for(int i=0;i<v[x].size();i++)
	{
		int u=v[x][i];
		if(!mark[u])
		{
			s[x].push_back(u);
			mark[u]=1;
			h[u]=h[x]+1;
			p[u]=x;
			dfs(u);
		}
	}
}
bool cmp(pii x,pii y)
{
	return (x.s>y.s);
}
main()
{
	ios_base::sync_with_stdio(false);
	int n,m;
	cin>>n>>m;
	if(m%2==1)
	{
		cout<<"No solution";
		return 0;
	}
	for(int i=1;i<=m;i++)
	{
		int t1,t2;
		cin>>t1>>t2;
		v[t1].push_back(t2);
		v[t2].push_back(t1);
	}
	mark[1]=1;
	dfs(1);
	for(int i=1;i<=n;i++)
		for(int j=0;j<v[i].size();j++)
			if(v[i][j]==p[i])
				swap(v[i][j],v[i][0]);
	for(int i=1;i<=n;i++)
		a[i].f=i,a[i].s=h[i];
	sort(a+1,a+1+n,cmp);
	for(int i=1;i<=n;i++)
	{
		int t=a[i].f;
		//cerr<<"T : "<<t<<endl;
		if((v[t].size()-ans[t])%2==0&&v[t].size()>ans[t])
		{
			for(int j=0;j<v[t].size();j++)
			{
				int u=v[t][j];
				while(mp[pii(t,u)]&&j<v[t].size())
				{
					j++;
					u=v[t][j];
				}
				if(j==v[t].size())
					continue;
				ans[u]++;
				mp[pii(t,u)]=1;
				mp[pii(u,t)]=1;
				cout<<u<<" "<<t<<" ";
				while(mp[pii(t,u)])
				{
					j++;
					u=v[t][j];
				}
				mp[pii(t,u)]=1;
				mp[pii(u,t)]=1;
				ans[u]++;
				cout<<u<<"\n";
			}
		}
		else if(v[t].size()-ans[t]>1)
		{
			for(int j=1;j<v[t].size();j++)
			{
				int u=v[t][j];
				while(mp[pii(t,u)]&&j<v[t].size())
				{
					j++;
					u=v[t][j];
				}
				if(j==v[t].size())
					continue;
				ans[u]++;
				mp[pii(t,u)]=1;
				mp[pii(u,t)]=1;
				cout<<u<<" "<<t<<" ";
				while(mp[pii(t,u)])
				{
					j++;
					u=v[t][j];
				}
				mp[pii(t,u)]=1;
				mp[pii(u,t)]=1;
				ans[u]++;
				cout<<u<<"\n";
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define ll long long
using namespace std;
const int maxn=1e5+10;
vector<int>vect[maxn];
int level[maxn],n,m,pos[maxn];
struct r{
    int a,b,c;
};
vector<r>rez;
int dfs(int x,int prv,int lvl){

    level[x]=lvl;
    pos[x]=1;

    vector<int>cand;
    for(int i=0;i<vect[x].size();i++){
        int id=vect[x][i];
        if(id==prv)continue;
        if(pos[id] && level[id]>level[x])continue;

        if(pos[id] && level[id]<level[x])cand.pb(id);
        else if(!dfs(id,x,lvl+1))cand.pb(id);
    }

    int ret=0;

    ///printf("%d %d XXX\n",x,prv);
    ///for(int i=0;i<cand.size();i++)printf("%d ",cand[i]);
    ///printf("\n\n");

    for(int i=0;i<cand.size();i+=2){
        if(i==cand.size()-1){
            rez.pb({cand[i],x,prv}),ret=1;
            ///printf("%d XXJEBOTE\n",x);
        }
        else rez.pb({cand[i],x,cand[i+1]});
    }

    return ret;
}
int main(){

	scanf("%d %d",&n,&m);
	for(int i=1;i<=m;i++){
        int u,v;
        scanf("%d %d",&u,&v);
        vect[u].pb(v);
        vect[v].pb(u);
	}

	if(m%2){
        printf("No solution\n");
        return 0;
	}

    dfs(1,0,0);

    for(int i=0;i<m/2;i++){printf("%d %d %d\n",rez[i].a,rez[i].b,rez[i].c);}

	return 0;
}


#include <bits/stdc++.h>

#define pp push_back
using namespace std;
const int N = 3e5+5;
///
struct ii{
    int x,y;
    bool ok;
};
int n,m;
ii e[N];
vector<int> w[N];
///

int dfs(int u){
    queue<int> q,a;
    for(int i=0;i<w[u].size();++i){
        ii &g=e[w[u][i]];
        if(g.ok)continue;
        q.push(g.x+g.y-u);
        g.ok=1;
    }
    while(!q.empty()){
        int v=q.front();
        q.pop();
        int d=dfs(v);
        if(d)cout<<u<<' '<<v<<' '<<d<<'\n';
        else a.push(v);
    }
    while(a.size()>1){
        int l=a.front();
        a.pop();
        int r=a.front();
        a.pop();
        cout<<l<<' '<<u<<' '<<r<<'\n';
    }
    int d=0;
    if(a.size())d=a.front(),a.pop();
    return d;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cin>>n>>m;
    for(int i=1;i<=m;++i){
        cin>>e[i].x>>e[i].y;
        w[e[i].x].pp(i);
        w[e[i].y].pp(i);
    }
    if(m&1){
        cout<<"No solution";
        return 0;
    }
    dfs(1);
    return 0;
}


#include<vector>
#include<stdio.h>
using namespace std;
const int maxn=1e5;

struct Solution{
	int a, b, c;
	Solution(int x, int y, int z):a(x),b(y),c(z){}
};

struct Edge{
	int from, to;
	bool vis;
	Edge(int f, int t, bool v):from(f), to(t), vis(v){}
	Edge():from(0),to(0),vis(0){}
};

vector<Edge> edges;
vector<Solution> sol;
int n, m, from, to, testtot;
vector<int>G[maxn*2+10];

bool dfs(int nowtot, int st){
	//if (testtot==10000) scanf("%d", &testtot);
	if (nowtot==m/2) {
		for (int i=0; i<sol.size(); i++)
			printf("%d %d %d\n", sol[i].a, sol[i].b, sol[i].c);
		return 1;
	}

	for (int i=st; i<=n; i++){
		for (int j=0; j<G[i].size(); j++){
			if (!edges[G[i][j]].vis && !edges[G[i][j]^1].vis){

				edges[G[i][j]].vis=1;edges[G[i][j]^1].vis=1;
				int x=edges[G[i][j]].to;

				for (int k=0; k<G[x].size(); k++)
					if (!edges[G[x][k]].vis && !edges[G[x][k]^1].vis){
						edges[G[x][k]].vis=1;edges[G[x][k]^1].vis=1;

						sol.push_back(Solution(i,x,edges[G[x][k]].to));
						/*for (int z=0; z<sol.size(); z++)
							printf("z=%d %d %d %d\n", z, sol[z].a, sol[z].b, sol[z].c);
						printf("\n\n\n");
						testtot++;*/
						if (j==G[i].size()-1)
							{if (dfs(nowtot+1,st+1)) return 1;}
						else
							if (dfs(nowtot+1,st)) return 1;
						edges[G[x][k]].vis=0;edges[G[x][k]^1].vis=0;
						sol.pop_back();

						/*for (int z=0; z<sol.size(); z++)
							printf("z =%d %d %d %d\n", z, sol[z].a, sol[z].b, sol[z].c);
						printf("\n\n\n");*/
					}

				edges[G[i][j]].vis=0;edges[G[i][j]^1].vis=0;
			}

		}
	}
	return 0;
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i=0; i<m; i++){
		scanf("%d%d", &from, &to);
		edges.push_back(Edge(from, to, 0));
		edges.push_back(Edge(to, from, 0));
		int s=edges.size();
		G[from].push_back(s-2);
		G[to].push_back(s-1);
	}

	if (m&1 || !dfs(0,1)) printf("No solution");
	return 0;
}


#include<vector>
#include<stdio.h>
using namespace std;
const int maxn=1e5;

struct Solution{
	int a, b, c;
	Solution(int x, int y, int z):a(x),b(y),c(z){}
};

struct Edge{
	int from, to;
	bool vis;
	Edge(int f, int t, bool v):from(f), to(t), vis(v){}
	Edge():from(0),to(0),vis(0){}
};

vector<Edge> edges;
vector<Solution> sol;
int n, m, from, to, testtot;
vector<int>G[maxn];

bool dfs(int nowtot, int st){
	//if (testtot==10000) scanf("%d", &testtot);
	if (nowtot==m/2) {
		for (int i=0; i<sol.size(); i++)
			printf("%d %d %d\n", sol[i].a, sol[i].b, sol[i].c);
		return 1;
	}

	for (int i=st; i<=n; i++){
		for (int j=0; j<G[i].size(); j++){
			if (!edges[G[i][j]].vis && !edges[G[i][j]^1].vis){

				edges[G[i][j]].vis=1;edges[G[i][j]^1].vis=1;
				int x=edges[G[i][j]].to;

				for (int k=0; k<G[x].size(); k++)
					if (!edges[G[x][k]].vis && !edges[G[x][k]^1].vis){
						edges[G[x][k]].vis=1;edges[G[x][k]^1].vis=1;

						sol.push_back(Solution(i,x,edges[G[x][k]].to));
						/*for (int z=0; z<sol.size(); z++)
							printf("z=%d %d %d %d\n", z, sol[z].a, sol[z].b, sol[z].c);
						printf("\n\n\n");
						testtot++;*/
						if (j==G[i].size()-1)
							{if (dfs(nowtot+1,st+1)) return 1;}
						else
							if (dfs(nowtot+1,st)) return 1;
						edges[G[x][k]].vis=0;edges[G[x][k]^1].vis=0;
						sol.pop_back();

						/*for (int z=0; z<sol.size(); z++)
							printf("z =%d %d %d %d\n", z, sol[z].a, sol[z].b, sol[z].c);
						printf("\n\n\n");*/
					}

				edges[G[i][j]].vis=0;edges[G[i][j]^1].vis=0;
			}

		}
	}
	return 0;
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i=0; i<m; i++){
		scanf("%d%d", &from, &to);
		edges.push_back(Edge(from, to, 0));
		edges.push_back(Edge(to, from, 0));
		int s=edges.size();
		G[from].push_back(s-2);
		G[to].push_back(s-1);
	}

	if (!dfs(0,1)) printf("No sulution");
}


#include<vector>
#include<stdio.h>
using namespace std;
const int maxn=1e5;

struct Solution{
	int a, b, c;
	Solution(int x, int y, int z):a(x),b(y),c(z){}
};

struct Edge{
	int from, to;
	bool vis;
	Edge(int f, int t, bool v):from(f), to(t), vis(v){}
	Edge():from(0),to(0),vis(0){}
};

vector<Edge> edges;
vector<Solution> sol;
int n, m, from, to, testtot;
vector<int>G[maxn];

bool dfs(int nowtot, int st){
	//if (testtot==10000) scanf("%d", &testtot);
	if (nowtot==m/2) {
		for (int i=0; i<sol.size(); i++)
			printf("%d %d %d\n", sol[i].a, sol[i].b, sol[i].c);
		return 1;
	}

	for (int i=st; i<=n; i++){
		for (int j=0; j<G[i].size(); j++){
			if (!edges[G[i][j]].vis && !edges[G[i][j]^1].vis){

				edges[G[i][j]].vis=1;edges[G[i][j]^1].vis=1;
				int x=edges[G[i][j]].to;

				for (int k=0; k<G[x].size(); k++)
					if (!edges[G[x][k]].vis && !edges[G[x][k]^1].vis){
						edges[G[x][k]].vis=1;edges[G[x][k]^1].vis=1;

						sol.push_back(Solution(i,x,edges[G[x][k]].to));
						/*for (int z=0; z<sol.size(); z++)
							printf("z=%d %d %d %d\n", z, sol[z].a, sol[z].b, sol[z].c);
						printf("\n\n\n");
						testtot++;*/
						if (j==G[i].size()-1)
							{if (dfs(nowtot+1,st+1)) return 1;}
						else
							if (dfs(nowtot+1,st)) return 1;
						edges[G[x][k]].vis=0;edges[G[x][k]^1].vis=0;
						sol.pop_back();

						/*for (int z=0; z<sol.size(); z++)
							printf("z =%d %d %d %d\n", z, sol[z].a, sol[z].b, sol[z].c);
						printf("\n\n\n");*/
					}

				edges[G[i][j]].vis=0;edges[G[i][j]^1].vis=0;
			}

		}
	}
	return 0;
}

int main(){
	scanf("%d%d", &n, &m);
	for (int i=0; i<m; i++){
		scanf("%d%d", &from, &to);
		edges.push_back(Edge(from, to, 0));
		edges.push_back(Edge(to, from, 0));
		int s=edges.size();
		G[from].push_back(s-2);
		G[to].push_back(s-1);
	}

	if (m&1 || !dfs(0,1)) printf("No sulution");
	return 0;
}


#include <stdio.h>
#include <vector>
#include <queue>
#include <string.h>
using namespace std;
const int T=1e5+5;
struct node
{
    int num,x;
}t;
vector<node> p[T];
bool flag[T];
int dfs(int now)
{
    queue<int>q; // ע��==>��ÿ���ڵ㶼��һ������
    int l=p[now].size();
    for(int i=0;i<l;i++)
    {
        node k=p[now][i];
        if(flag[k.num])
            continue;
        else flag[k.num]=1;
        int r=dfs(k.x);
        if(r)
            printf("%d %d %d\n",now,k.x,r);
            else q.push(k.x);
    }
    while(q.size()>=2)
    {
        int v1=q.front();
        q.pop();
        int v2=q.front();
        q.pop();
        printf("%d %d %d\n",v1,now,v2);
    }
    while(!q.empty())
    {
        int v3=q.front();
        q.pop();
        return v3;// �������������ʣ�࣬�򽫴˶�����ĵ㷵�ػ�ȥ���丸�ڵ㣬���ڵ�ĸ��ڵ㹹��һ����ͼ
    }
    return 0;
}
int main()
{
    int n,m,a,b;
   while(scanf("%d%d",&n,&m)!=EOF)
    {
        for(int i=0; i<n; i++)
            p[i].clear();
        for(int i=1; i<=m; i++)
        {
            scanf("%d%d",&a,&b);
            t.num=i;//Ϊÿ���߱����ţ�������Ҹñ��Ƿ��߹�
            t.x=a;
            p[b].push_back(t);
            t.x=b;
            p[a].push_back(t);
        }
        if(m%2==1)
            printf("No solution\n");
        else
        {
            memset(flag,0,sizeof(flag));
            dfs(1);
        }
    }
    return 0;
}


                                      /*  ***  In The Name of God ... ***  */
                                            /*    nIMA kHODAVEISI    */
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define bug() cout << "BUG" << endl ;
#define X first
#define Y second
#define sz(x) (int)x.size()
#define per(how) cout << fixed << setprecision(how)
#define bit(a , b) (a >> b) & 1
#define all(v) v.begin() , v.end()
#define LB(x) (x & -x)
typedef long long ll;
typedef long double ld;
const ll INF = 1e18 ;
void smin(ll &x , ll y) { x = min(x , y) ; }
void smax(ll &x , ll y) { x = max(x , y) ; }

const ll MAXN = 1e5 + 100 ;
ll n , m ;
vector < ll > adj[MAXN] ;
vector < pair < ll , pair < ll , ll > > > res ;
vector < ll > can[MAXN] ;
ll h[MAXN] ;
bool mark[MAXN] ;

void dfs(ll v , ll par = -1 , ll he = 0)
{
	mark[v] = true ;
	h[v] = he ;
	if(par > -1)	can[v].pb(par) ;
	for(auto u : adj[v])
	{
		if(u == par)	continue ;
		if(!mark[u])	dfs(u , v , ++he) ;
		else if(h[u] < h[v])	can[v].pb(u) ;
	}
	while(can[v].size() >= 2)
	{
		ll first = can[v].back() ;
		can[v].pop_back() ;
		ll sec = can[v].back() ;
		can[v].pop_back() ;
		res.pb({first , {v , sec}}) ;
	}
	if(can[v].size() && par > -1)	can[v].pop_back() , can[par].pb(v) ;
}

int main ()
{
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n >> m ;
	for(ll i = 0 ; i < m ; i++)
	{
		ll u , v ;
		cin >> u >> v ;
		adj[--u].pb(--v) , adj[v].pb(u) ;
	}
	if(m & 1)	return cout << "No solution" , 0 ;
	dfs(0) ;
	for(auto x : res)	cout << ++x.X << " " << ++x.Y.X << " " << ++x.Y.Y << endl ;
}


#include <iostream>
#include <vector>
#include <map>
using namespace std;
map < int, map < int, int > > used;
int n, m;
vector < int > neigh[1000042];

int pr ( int x ) {
    vector < int > unpr, adj ;

    for ( int i = 0 ; i < neigh[x].size() ; i ++ ) {

        if ( used[ x ][ neigh[x][i] ] ) { continue; }
        used[ x ][ neigh[x][i] ] = 1;
        used[ neigh[x][i] ][ x ] = 1;

        adj.push_back( neigh[x][i] );
    }

    for ( int i = 0 ; i < adj.size() ; i ++ ) {
        int crr = pr( adj[i] );
        if ( crr ) {
            cout << x << " " << adj[i] << " " << crr << "\n";
        }else {
            unpr.push_back( adj[i] );
        }
    }

    for ( ; unpr.size() >= 2 ; ) {
        int u = unpr.back(); unpr.pop_back();
        int v = unpr.back(); unpr.pop_back();

        cout << u << " " << x << " " << v << "\n";
    }

    if ( unpr.size() ) {
        return unpr.back();
    }else {
        return 0;
    }
}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> n >> m;
    if ( m%2 ) { cout << "No solution\n"; return 0; }

    for ( int i = 0 ; i < m ; i ++ ) {
        int a, b;
        cin >> a >> b;
        neigh[a].push_back( b );
        neigh[b].push_back( a );
    }
    pr ( 1 );
    return 0;
}


#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
unordered_map < int, unordered_map < int, int > > used;
int n, m;
vector < int > neigh[1000042];

int pr ( int x ) {
    vector < int > unpr, adj ;

    for ( int i = 0 ; i < neigh[x].size() ; i ++ ) {

        if ( used[ x ][ neigh[x][i] ] ) { continue; }
        used[ x ][ neigh[x][i] ] = 1;
        used[ neigh[x][i] ][ x ] = 1;

        adj.push_back( neigh[x][i] );
    }

    for ( int i = 0 ; i < adj.size() ; i ++ ) {
        int crr = pr( adj[i] );
        if ( crr ) {
            cout << x << " " << adj[i] << " " << crr << "\n";
        }else {
            unpr.push_back( adj[i] );
        }
    }

    for ( ; unpr.size() >= 2 ; ) {
        int u = unpr.back(); unpr.pop_back();
        int v = unpr.back(); unpr.pop_back();

        cout << u << " " << x << " " << v << "\n";
    }

    if ( unpr.size() ) {
        return unpr.back();
    }else {
        return 0;
    }
}

int main () {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> n >> m;
    if ( m%2 ) { cout << "No solution\n"; return 0; }

    for ( int i = 0 ; i < m ; i ++ ) {
        int a, b;
        cin >> a >> b;
        neigh[a].push_back( b );
        neigh[b].push_back( a );
    }
    pr ( 1 );
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie() , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

inline int rit(){
    char c = getchar();
    int res = 0;
    while(!isdigit(c)) c = getchar();
    while(isdigit(c)) res = (res << 1) + (res << 3) + c - '0' , c = getchar();
    return res;
}
int n , m , res[MAX] , use[MAX] , x[MAX][2];
vector<PII> v[MAX];
vector<PII> p;
void DFS(int now){
    for(int &i = res[now] ; i < v[now].size() ; i++){
        if(use[v[now][i].B]) continue;
           use[v[now][i].B] = 1;
        int a = now , b = v[now][i].A;
        DFS(v[now][i].A);
        p.pb(mp(b , a));
    }
}
int tt[5];
int32_t main(){
    srand(10430579);
    n = rit() , m = rit();
    REP(i , 0 , m){
        x[i][0] = rit() , x[i][1] = rit();
        v[x[i][0]].pb(mp(x[i][1] , i));
        v[x[i][1]].pb(mp(x[i][0] , i));
    }
    if(m % 2 == 1) cout << "No solution" << endl;
    else {
        while(1){
            p.clear();
            MEM(res , 0);
            MEM(use , 0);
            DFS(rand() % n + 1);
            int ok = 1;
            for(int i = 1 ; i < p.size() ; i += 2){
                int tok = 0;
                if(p[i - 1].A == p[i].A) tok = 1;
                if(p[i - 1].A == p[i].B) tok = 1;
                if(p[i - 1].B == p[i].A) tok = 1;
                if(p[i - 1].B == p[i].B) tok = 1;
                if(tok == 0) {ok = 0; break;}
            }
            if(ok == 1) break;
        }
        for(int i = 1 ; i < p.size() ; i += 2){
            if(p[i - 1].A == p[i].A) printf("%d %d %d\n", p[i - 1].B , p[i].A , p[i].B);
            if(p[i - 1].A == p[i].B) printf("%d %d %d\n", p[i - 1].B , p[i].B , p[i].A);
            if(p[i - 1].B == p[i].A) printf("%d %d %d\n", p[i - 1].A , p[i].A , p[i].B);
            if(p[i - 1].B == p[i].B) printf("%d %d %d\n", p[i - 1].A , p[i].B , p[i].A);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie() , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

inline int rit(){
    char c = getchar();
    int res = 0;
    while(!isdigit(c)) c = getchar();
    while(isdigit(c)) res = (res << 1) + (res << 3) + c - '0' , c = getchar();
    return res;
}
int n , m , res[MAX] , use[MAX] , x[MAX][2];
vector<PII> v[MAX];
vector<PII> p;
void DFS(int now){
    for(int &i = res[now] ; i < v[now].size() ; i++){
        if(use[v[now][i].B]) continue;
           use[v[now][i].B] = 1;
        int a = now , b = v[now][i].A;
        DFS(v[now][i].A);
        p.pb(mp(b , a));
        // DBGG(b , a);
    }
}
int32_t main(){
    n = rit() , m = rit();
    REP(i , 0 , m){
        x[i][0] = rit() , x[i][1] = rit();
        v[x[i][0]].pb(mp(x[i][1] , i));
        v[x[i][1]].pb(mp(x[i][0] , i));
    }
    int sml = INF;
    REP(i , 1 , n + 1) sml = min(sml , int(v[i].size()));
    REP(i , 1 , n + 1){
        if(v[i].size() == sml){
            DFS(i);
            break;
        }
    }
    if(m % 2 == 1) cout << "No solution" << endl;
    else {
        for(int i = 1 ; i < p.size() ; i += 2){
            printf("%d %d %d\n", p[i - 1].A , p[i - 1].B , p[i].B);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie() , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

inline int rit(){
    char c = getchar();
    int res = 0;
    while(!isdigit(c)) c = getchar();
    while(isdigit(c)) res = (res << 1) + (res << 3) + c - '0' , c = getchar();
    return res;
}

int n , m , use[MAX];
vector<PII> v[MAX];
int DFS(int now){
    queue<int> qu;
    for(auto to : v[now]){
        if(use[to.B]) continue;
        use[to.B] = 1;
        int tmp = DFS(to.A);
        if(tmp) printf("%d %d %d\n", tmp , to.A , now);
        else qu.push(to.A);
    }
    while(qu.size() >= 2){
        int a = qu.front(); qu.pop();
        int b = qu.front(); qu.pop();
        printf("%d %d %d\n", a , now , b);
    }
    if(qu.size() == 0) return 0;
    else return qu.front();
}
int32_t main(){
    n = rit() , m = rit();
    REP(i , 1 , m + 1){
        int a , b;
        cin >> a >> b;
        v[a].pb(mp(b , i));
        v[b].pb(mp(a , i));
    }
    if(m % 2 == 1) puts("No solution");
    else DFS(1);
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie() , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

inline int rit(){
    char c = getchar();
    int res = 0;
    while(!isdigit(c)) c = getchar();
    while(isdigit(c)) res = (res << 1) + (res << 3) + c - '0' , c = getchar();
    return res;
}
int n , m , res[MAX] , use[MAX] , x[MAX][2];
vector<PII> v[MAX];
vector<PII> p;
void DFS(int now){
    for(int &i = res[now] ; i < v[now].size() ; i++){
        if(use[v[now][i].B]) continue;
           use[v[now][i].B] = 1;
        int a = now , b = v[now][i].A;
        DFS(v[now][i].A);
        p.pb(mp(b , a));
        // DBGG(b , a);
    }
}
int tt[5];
int32_t main(){
    // srand(time(NULL));
    n = rit() , m = rit();
    REP(i , 0 , m){
        x[i][0] = rit() , x[i][1] = rit();
        v[x[i][0]].pb(mp(x[i][1] , i));
        v[x[i][1]].pb(mp(x[i][0] , i));
    }
    if(m % 2 == 1) cout << "No solution" << endl;
    else {
        while(1){
            DFS(rand() % n + 1);
            int ok = 1;
            for(int i = 1 ; i < p.size() ; i += 2){
                int tok = 0;
                if(p[i - 1].A == p[i].A) tok = 1;
                if(p[i - 1].A == p[i].B) tok = 1;
                if(p[i - 1].B == p[i].A) tok = 1;
                if(p[i - 1].B == p[i].B) tok = 1;
                if(tok == 0) {ok = 0; break;}
            }
            if(ok = 1) break;
            MEM(res , 0);
            MEM(use , 0);
        }
        for(int i = 1 ; i < p.size() ; i += 2){
            if(p[i - 1].A == p[i].A) printf("%d %d %d\n", p[i - 1].B , p[i].A , p[i].B);
            if(p[i - 1].A == p[i].B) printf("%d %d %d\n", p[i - 1].B , p[i].B , p[i].A);
            if(p[i - 1].B == p[i].A) printf("%d %d %d\n", p[i - 1].A , p[i].A , p[i].B);
            if(p[i - 1].B == p[i].B) printf("%d %d %d\n", p[i - 1].A , p[i].B , p[i].A);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie() , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

inline int rit(){
    char c = getchar();
    int res = 0;
    while(!isdigit(c)) c = getchar();
    while(isdigit(c)) res = (res << 1) + (res << 3) + c - '0' , c = getchar();
    return res;
}
int n , m , res[MAX] , use[MAX] , x[MAX][2];
vector<PII> v[MAX];
vector<PII> p;
void DFS(int now){
    for(int &i = res[now] ; i < v[now].size() ; i++){
        if(use[v[now][i].B]) continue;
           use[v[now][i].B] = 1;
        int a = now , b = v[now][i].A;
        DFS(v[now][i].A);
        p.pb(mp(b , a));
        // DBGG(b , a);
    }
}
int32_t main(){
    n = rit() , m = rit();
    REP(i , 0 , m){
        x[i][0] = rit() , x[i][1] = rit();
        v[x[i][0]].pb(mp(x[i][1] , i));
        v[x[i][1]].pb(mp(x[i][0] , i));
    }
    DFS(1);
    if(m % 2 == 1) cout << "No solution" << endl;
    else {
        for(int i = 1 ; i < p.size() ; i += 2){
            printf("%d %d %d\n", p[i - 1].A , p[i - 1].B , p[i].B);
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie() , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX 100900
#define INF 0x3f3f3f3f

inline int rit(){
    char c = getchar();
    int res = 0;
    while(!isdigit(c)) c = getchar();
    while(isdigit(c)) res = (res << 1) + (res << 3) + c - '0' , c = getchar();
    return res;
}
int n , m , res[MAX] , use[MAX] , x[MAX][2];
vector<PII> v[MAX];
vector<PII> p;
void DFS(int now){
    for(int &i = res[now] ; i < v[now].size() ; i++){
        if(use[v[now][i].B]) continue;
           use[v[now][i].B] = 1;
        int a = now , b = v[now][i].A;
        DFS(v[now][i].A);
        p.pb(mp(b , a));
    }
}
int tt[5];
int32_t main(){
    srand(10430579);
    n = rit() , m = rit();
    REP(i , 0 , m){
        x[i][0] = rit() , x[i][1] = rit();
        v[x[i][0]].pb(mp(x[i][1] , i));
        v[x[i][1]].pb(mp(x[i][0] , i));
    }
    if(m % 2 == 1) cout << "No solution" << endl;
    else {
        int ok;
        REP(i , 0 , 100){
            p.clear();
            MEM(res , 0);
            MEM(use , 0);
            DFS(rand() % n + 1);
            ok = 1;
            for(int i = 1 ; i < p.size() ; i += 2){
                int tok = 0;
                if(p[i - 1].A == p[i].A) tok = 1;
                if(p[i - 1].A == p[i].B) tok = 1;
                if(p[i - 1].B == p[i].A) tok = 1;
                if(p[i - 1].B == p[i].B) tok = 1;
                if(tok == 0) {ok = 0; break;}
            }
            if(ok == 1) break;
        }
        if(ok == 0){
            puts("No solution");
            return 0;
        }
        for(int i = 1 ; i < p.size() ; i += 2){
            if(p[i - 1].A == p[i].A) printf("%d %d %d\n", p[i - 1].B , p[i].A , p[i].B);
            if(p[i - 1].A == p[i].B) printf("%d %d %d\n", p[i - 1].B , p[i].B , p[i].A);
            if(p[i - 1].B == p[i].A) printf("%d %d %d\n", p[i - 1].A , p[i].A , p[i].B);
            if(p[i - 1].B == p[i].B) printf("%d %d %d\n", p[i - 1].A , p[i].B , p[i].A);
        }
    }
    return 0;
}


package main

import "fmt"

func main ()  {
	var n, h int
	minWidth := 0
	fmt.Scan(&n, &h)
	for i := 0; i < n; i ++ {
		var currentHight int
		fmt.Scan(&currentHight)
		if currentHight > h {
			minWidth += 2
		} else {
			minWidth ++
		}
	}
	fmt.Println(minWidth)
}


package main

import 	"fmt"

func main() {
	var n, h int
	var a [1001]int
	x:=0
	fmt.Scanf("%d%d", &n, &h)

	for i:=0; i<n + 1; i++{
		fmt.Scanf("%d", &a[i])
		if a[i] > h {
			x +=2
		}else{
			x++
		}
	}

	fmt.Println(x-1)
}


package main

import 	"fmt"

func main() {
	var n, h int
	var a [1000]int
	x:=0
	fmt.Scanf("%d%d", &n, &h)

	for i:=0; i<n + 1; i++{
		fmt.Scanf("%d", &a[i])
		if a[i] > h {
			x +=2
		}else{
			x++
		}
	}

	fmt.Println(x-1)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	var n, h, o,s uint16
	fmt.Fscanf(in, "%d %d\n", &n, &h)
	for i:=0; uint16(i) < n; i++{
		fmt.Fscanf(in, "%d", &o)
		if o > h{
			s+=2
		}else{
			s++
		}
	}
	fmt.Println(s)
}


package main

import (
	"fmt"
)

func main() {
	var n,h,temp,bend int
	fmt.Scanf("%d %d\n",&n,&h)
	for i:= 0 ; i < n ; i++{
		fmt.Scanf("%d",&temp)
		if(temp > h){
			bend+=1
		}
	}
	fmt.Println((n-bend) + (bend*2))
}


// MIT License
//
// Copyright (c) 2017 Nobi Hoang <nobi.hoa@gmail.com>
//
// http://codeforces.com/problemset/problem/677/A
//

package main

import (
  "bufio"
  "fmt"
  "os"
  "strings"
  "strconv"
)

// ReadLine reads a line from the command line.
// It returns the line and an error if that fails.
func ReadLine() (string, error) {
  line, err := bufio.NewReader(os.Stdin).ReadString('\n')
  if err != nil {
    return "", err
  }
  return strings.TrimSpace(string(line)), nil
}

// Execute run
func Execute() {
  var n, h int
  fmt.Scanf("%d %d\n", &n, &h)

  var a = make([]int, n)
  s, _ := ReadLine()
  for i, str := range strings.Split(s, " ") {
    num, _ := strconv.Atoi(str)
    a[i] = num
  }

  sum := 0
  for i := 0; i < n; i++ {
    if a[i] >= h  {
      sum += 2
    } else {
      sum++
    }
  }
  fmt.Println(sum)
}

func main() {
  Execute()
}


// MIT License
//
// Copyright (c) 2017 Nobi Hoang <nobi.hoa@gmail.com>
//
// http://codeforces.com/problemset/problem/677/A
//

package main

import (
  "bufio"
  "fmt"
  "os"
  "strings"
  "strconv"
)

// ReadLine reads a line from the command line.
// It returns the line and an error if that fails.
func ReadLine() (string, error) {
  line, err := bufio.NewReader(os.Stdin).ReadString('\n')
  if err != nil {
    return "", err
  }
  return strings.TrimSpace(string(line)), nil
}

// Execute run
func Execute() {
  var n, h int
  fmt.Scanf("%d %d\n", &n, &h)

  var a = make([]int, n)
  s, _ := cmdutil.ReadLine()
  for i, str := range strings.Split(s, " ") {
    num, _ := strconv.Atoi(str)
    a[i] = num
  }

  sum := 0
  for i := 0; i < n; i++ {
    if a[i] >= h  {
      sum += 2
    } else {
      sum++
    }
  }
  fmt.Println(sum)
}

func main() {
  Execute()
}


// MIT License
//
// Copyright (c) 2017 Nobi Hoang <nobi.hoa@gmail.com>
//
// http://codeforces.com/problemset/problem/677/A
//

package main

import (
  "bufio"
  "fmt"
  "os"
  "strings"
  "strconv"
)

// ReadLine reads a line from the command line.
// It returns the line and an error if that fails.
func ReadLine() (string, error) {
  line, err := bufio.NewReader(os.Stdin).ReadString('\n')
  if err != nil {
    return "", err
  }
  return strings.TrimSpace(string(line)), nil
}

// Execute run
func Execute() {
  var n, h int
  fmt.Scanf("%d %d\n", &n, &h)

  var a = make([]int, n)
  s, _ := ReadLine()
  for i, str := range strings.Split(s, " ") {
    num, _ := strconv.Atoi(str)
    a[i] = num
  }

  sum := 0
  for i := 0; i < n; i++ {
    if a[i] > h  {
      sum += 2
    } else {
      sum++
    }
  }
  fmt.Println(sum)
}

func main() {
  Execute()
}


package main

import "fmt"

func main() {
	var n, h, a int
	var count int = 0
	fmt.Scan(&n, &h)
	for i := 1; i <= n; i++ {
		fmt.Scan(&a)
		if a <= h {
			count += 1
		} else if a > h {
			count += 2
		}
	}
	fmt.Print(count)
}


package main

import "fmt"

func main() {
	var n, t int
	fmt.Scan(&n, &t)
	ans := 0
	for ; n > 0; n-- {
		var x int
		fmt.Scan(&x)
		if x <= t {
			ans++
		} else {
			ans += 2
		}
	}
	fmt.Println(ans)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()

	var (
		n    int
		h    int
		a    int
		road int
	)

	scanf("%d %d\n", &n, &h)

	for i := 0; i < n; i++ {
		scanf("%d", &a)

		if a > h {
			road += 2
		} else {
			road++
		}
	}

	printf("%d\n", road)
}


package main
import "fmt"
func main() {
	var a,ct,n,h int
	fmt.Scan(&n,&h)
	for i := 0; i < n; i++ {
	    fmt.Scan(&a)
	    if a>h {
	        ct += 2
	    }else {
	        ct += 1
	    }
	}
	fmt.Println(ct)
}


package main

import (
    "os"
    "bufio"
    "fmt"
    "strconv"
)

var scanner *bufio.Scanner
func read() string {
    if !scanner.Scan() {
		panic("Scan returned false")
	}
	return scanner.Text()
}
func readInt() int {
	num, _ := strconv.Atoi(read())
	return num
}
func main() {
    scanner = bufio.NewScanner(os.Stdin)
    scanner.Split(bufio.ScanWords)
    n := readInt()
    h := readInt()

    cnt := n
    for i := 0 ; i < n; i++ {
        ai := readInt()

        if ai > h {
            cnt++
        }
    }

    fmt.Println(cnt)
}


package main
import (
	 "fmt"
)

func main() {
	 var n, x, kol int

	 fmt.Scanf("%d%d", &n, &x)
	 for i := 0; i<n; i ++ {
	 	   var a int
	 	   fmt.Scan(&a)

	 	   if a > x {
	 	   	kol += 2
	 	   } else {
	 	   	kol ++
	 	   }
	 }

	 fmt.Printf("%d", kol)
}


package main

import "fmt"

func main() {
	var n, h int
	fmt.Scan(&n, &h)
	var total int
	for i := 0; i < n; i++ {
		var height int
		fmt.Scan(&height)
		if height > h {
			total += 2
		} else {
			total++
		}
	}
	fmt.Print(total)
}


package main

import "fmt"

func main() {
	var n, h int
	fmt.Scan(&n)
	fmt.Scan(&h)

	var a int
	w := 0
	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		if a > h {
			w += 2
		} else {
			w++
		}
	}
	fmt.Print(w)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	var myStrings [2]string
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 2; i++ {
		scanner.Scan()
		myStrings[i] = scanner.Text()
	}

	initialization := strings.Split(myStrings[0], " ")
	listOfFriendsHeights := strings.Split(myStrings[1], " ")
	h, _ := strconv.Atoi(initialization[1])
	var roadWidth int
	for _, friendHeight := range listOfFriendsHeights {
		friendHeight, _ := strconv.Atoi(friendHeight)
		if friendHeight > h {
			roadWidth++
		}
		roadWidth++
	}
	fmt.Println(roadWidth)
}


package main

import (
	"bufio"
	"os"
	"strconv"
	"strings"
)

func main() {
	var myStrings [2]string
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 2; i++ {
		scanner.Scan()
		myStrings[i] = scanner.Text()
	}

	initialization := strings.Split(myStrings[0], " ")
	listOfFriendsHeights := strings.Split(myStrings[1], " ")
	h, _ := strconv.Atoi(initialization[1])
	var roadWidth int
	//
	for _, friendHeight := range listOfFriendsHeights {
		friendHeight, _ := strconv.Atoi(friendHeight)
		if friendHeight > h {
			roadWidth++
		}
		roadWidth++
	}
	println(roadWidth)
}


package main
import "fmt"

func main(){
	    var n, h, counter, value int
		fmt.Scan(&n)
		fmt.Scan(&h)

		for i := 0; i < n; i++ {
	    	fmt.Scan(&value)
	    	if value > h {
	    		counter += 2
	    	} else {
	    		counter += 1
	    	}
	    }
	    fmt.Println(counter)
}


package main

import "fmt"

func main() {
	var n, h int
	fmt.Scanf("%d %d\n", &n, &h)
	ret := 0

	for i := 0; i < n; i++ {
		var tmp = 0
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			ret += 2
		} else {
			ret += 1
		}
	}

	fmt.Printf("%d\n", ret)
}


package main

import "fmt"

func main() {
	var n, h int
	fmt.Scanf("%d %d", &n, &h)
	ret := 0

	for i := 0; i < n; i++ {
		var tmp = 0
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			ret += 2
		} else {
			ret += 1
		}
	}

	fmt.Printf("%d\n", ret)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	var result int64
	reader := bufio.NewReader(os.Stdin)
	tmp := readInt64Slice(reader, 2)
	n, h := tmp[0], tmp[1]
	tmp = readInt64Slice(reader, int(n))
	for i := 0; i < len(tmp); i++ {
		if tmp[i] > h {
			result += 2
		} else {
			result++
		}
	}
	fmt.Println(result)
}

func readOneInt64(r *bufio.Reader) (n int64) {
	bytes, _ := r.ReadBytes('\n')
	n, _ = strconv.ParseInt(string(bytes[:len(bytes)-2]), 10, 64)
	return
}

func readInt64Slice(r *bufio.Reader, n int) (slice []int64) {
	var bytes []byte
	slice = make([]int64, n)
	n--
	for i := 0; i < n; i++ {
		bytes, _ = r.ReadBytes(' ')
		slice[i], _ = strconv.ParseInt(string(bytes[:len(bytes)-1]), 10, 64)
	}
	slice[n] = readOneInt64(r)
	return
}

//func readOneString(r *bufio.Reader) []byte {
//	bytes, _ := r.ReadBytes('\n')
//	return bytes[:len(bytes)-2]
//}


package main

import "fmt"

func main() {
	var n, h, w, a int

	fmt.Scan(&n, &h)
	for i := 0; i < n; i++ {
		fmt.Scan(&a)
		if a > h {
			w += 2
		} else {
			w += 1
		}
	}

	fmt.Println(w)
}


package main

import "fmt"

func main() {
	n := 0
	h := 0

	fmt.Scan(&n, &h)

	a := 0
	w := 0
	for i:= 0; i < n; i ++ {
		fmt.Scan(&a)
		if a <= h {
			w += 1
		} else {
			w += 2
		}
	}
	fmt.Print(w)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var p, fh, w int
	scanf("%d %d\n", &p, &fh)
	for i := 0; i < p; i++ {
		var height int
		scanf("%d", &height)
		if height > fh {
			w += 2
		} else {
			w++
		}
	}
	printf("%d\n", w)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var p, fh, w int
	scanf("%d\n", &p)
	scanf("%d\n", &fh)
	fmt.Println(p)
	for i := 0; i < p; i++ {
		var height int
		scanf("%d\n", &height)
		if height > fh {
			w += 2
		} else {
			w++
		}
	}
	printf("%d\n", w)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var p, fh, w int
	scanf("%d %d\n", &p, &fh)
	for i := 0; i < p; i++ {
		var height int
		scanf("%d\n", &height)
		if height > fh {
			w += 2
		} else {
			w++
		}
	}
	printf("%d\n", w)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var a, b int
	scanf("%d %d\n", &a, &b)
	printf("%d\n", a+b)
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	// STDOUT MUST BE FLUSHED MANUALLY!!!
	defer writer.Flush()

	var a, b int
	scanf("%d %d\n", &a, &b)
	printf("%d\n", a+b)
	printf("%d\n", a+b)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	fsc := NewFastScanner()
	N, K := fsc.NextInt(), fsc.NextInt()
	ans := 0
	for i := 0; i < N; i++ {
		var height int
		height = fsc.NextInt()
		if height > K {
			ans++
		}
	}
	fmt.Println(ans)
}

//template
type FastScanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 2028)
	return &FastScanner{r: rdr}
}

func (s *FastScanner) next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}

func (s *FastScanner) NextInt() int {
	val, err := strconv.Atoi(s.next())
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) NextInt64() int64 {
	val, err := strconv.ParseInt(s.next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) pre() {
	if s.p >= len(s.buf) {
		s.ReadLine()
		s.p = 0
	}
}

func (s *FastScanner) ReadLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, err := s.r.ReadLine()
		if err != nil {
			panic(err.Error())
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	fsc := NewFastScanner()
	N, K := fsc.NextInt(), fsc.NextInt()
	ans := 0
	for i := 0; i < N; i++ {
		var height int
		height = fsc.NextInt()
		if height > K {
			ans += 2
		} else {
			ans += 1
		}
	}
	fmt.Println(ans)
}

//template
type FastScanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewFastScanner() *FastScanner {
	rdr := bufio.NewReaderSize(os.Stdin, 2028)
	return &FastScanner{r: rdr}
}

func (s *FastScanner) next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}

func (s *FastScanner) NextInt() int {
	val, err := strconv.Atoi(s.next())
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) NextInt64() int64 {
	val, err := strconv.ParseInt(s.next(), 10, 64)
	if err != nil {
		panic(err)
	}
	return val
}
func (s *FastScanner) pre() {
	if s.p >= len(s.buf) {
		s.ReadLine()
		s.p = 0
	}
}

func (s *FastScanner) ReadLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, err := s.r.ReadLine()
		if err != nil {
			panic(err.Error())
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}


package main

import (
	"fmt"
)

func solve(a []int, h int) int {
	w := len(a)
	for _, ai := range a {
		if ai > h {
			w ++
		}
	}
	return w
}

func main() {
	n, h := 0, 0
	_, err := fmt.Scanln(&n, &h)
	if err != nil {
		panic(err)
	}
	a := make([]int, n)
	pa := make([]interface{}, n)
	for i := range a {
		pa[i] = &a[i]
	}
	_, err = fmt.Scanln(pa...)
	if err != nil {
		panic(err)
	}
	w := solve(a, h)
	fmt.Println(w)
}


package main;

import "fmt"

func main() {
	var n, h, w int
	fmt.Scan(&n, &h)

	w = 0
	for i:=0;i<n;i++ {
		var t int
		fmt.Scan(&t)
		if t>h {
			w += 2
		} else {
			w += 1
		}
	}
	fmt.Println(w)
}


package main

import "fmt"

// https://codeforces.com/problemset/problem/677/A
// A. Vanya and Fence
// time limit per test
// 1 second
// memory limit per test
// 256 megabytes
// input
// standard input
// output
// standard output

// Vanya and his friends are walking along the fence of height h and they do not want the guard to notice them. In order to achieve this the height of each of the friends should not exceed h. If the height of some person is greater than h he can bend down and then he surely won't be noticed by the guard. The height of the i-th person is equal to ai.

// Consider the width of the person walking as usual to be equal to 1, while the width of the bent person is equal to 2. Friends want to talk to each other while walking, so they would like to walk in a single row. What is the minimum width of the road, such that friends can walk in a row and remain unattended by the guard?
// Input

// The first line of the input contains two integers n and h (1 ≤ n ≤ 1000, 1 ≤ h ≤ 1000) — the number of friends and the height of the fence, respectively.

// The second line contains n integers ai (1 ≤ ai ≤ 2h), the i-th of them is equal to the height of the i-th person.
// Output

// Print a single integer — the minimum possible valid width of the road.

func main() {
	var n, h int
	fmt.Scan(&n, &h)

	peoplesHeights := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&peoplesHeights[i])
	}

	var minWidth int
	for _, height := range peoplesHeights {
		if height > h {
			minWidth += 2
		} else {
			minWidth++
		}
	}
	fmt.Print(minWidth)
}


package main

import "fmt"

func main()  {
	var n, h, res int
	fmt.Scanf("%d %d\n", &n, &h)
	for i, tmp := 0, 0; i < n; i++ {
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			res += 2
		} else {
			res++
		}
	}
	fmt.Println(res)

}


package main

import "fmt"

func main()  {
	var n, h, res int
	fmt.Scanf("%d %d", &n, &h)
	for i, tmp := 0, 0; i < n; i++ {
		fmt.Scanf("%d", &tmp)
		if tmp > h {
			res += 2
		} else {
			res++
		}
	}
	fmt.Println(res)

}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func main() {
	n := getInt()
	h := getInt()
	ans := n
	for i := 0; i < n; i++ {
		a := getInt()
		if a > h {
			ans++
		}
	}
	fmt.Println(ans)
}

type Input struct {
	*bufio.Scanner
}

var globalInput = wrapStdin()

func wrapStdin() Input {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	return Input{Scanner: sc}
}
func getInt() int {
	globalInput.Scan()
	x, _ := strconv.Atoi(globalInput.Text())
	return x
}
func getIntOk() (int, bool) {
	ok := globalInput.Scan()
	x, _ := strconv.Atoi(globalInput.Text())
	return x, ok
}
func getNint(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		v[i] = getInt()
	}
	return v
}
func getVint(v []int) bool {
	var ok bool
	for i := 0; i < len(v); i++ {
		v[i], ok = getIntOk()
	}
	return ok
}
func getWord() string {
	globalInput.Scan()
	return globalInput.Text()
}
func getWordOk() (string, bool) {
	ok := globalInput.Scan()
	return globalInput.Text(), ok
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}
func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func minStr(a, b string) string {
	if a < b {
		return a
	}
	return b
}
func maxStr(a, b string) string {
	if a < b {
		return b
	}
	return a
}
func remin(a *int, b int) bool {
	if b < *a {
		*a = b
		return true
	}
	return false
}
func remax(a *int, b int) bool {
	if b > *a {
		*a = b
		return true
	}
	return false
}
func remin64(a *int64, b int64) bool {
	if b < *a {
		*a = b
		return true
	}
	return false
}
func remax64(a *int64, b int64) bool {
	if b > *a {
		*a = b
		return true
	}
	return false
}
func reminStr(a *string, b string) bool {
	if b < *a {
		*a = b
		return true
	}
	return false
}
func remaxStr(a *string, b string) bool {
	if b > *a {
		*a = b
		return true
	}
	return false
}

func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}
func abs64(x int64) int64 {
	if x < 0 {
		return -x
	}
	return x
}

type (
	FLess    func(i, j int) bool
	FSwap    func(i, j int)
	wrapSort struct {
		Length int
		FLess
		FSwap
	}
)

func (w *wrapSort) Len() int           { return w.Length }
func (w *wrapSort) Less(i, j int) bool { return w.FLess(i, j) }
func (w *wrapSort) Swap(i, j int)      { w.FSwap(i, j) }
func wsort(length int, fless func(i, j int) bool, fswap func(i, j int)) {
	sort.Sort(&wrapSort{length, fless, fswap})
}


package main

// https://codeforces.com/problemset/problem/677/A

import "fmt"

func taskSolution(a []int, h int) int {
	ans := len(a)
	for _, ai := range a {
		if ai > h {
			ans += 1
		}
	}
	return ans
}

func main() {
	var n, h int
	if _, err := fmt.Scan(&n, &h); err != nil {
		panic(err)
	}

	a := []int{}
	for i := 0; i < n; i += 1 {
		var ai int
		if _, err := fmt.Scan(&ai); err != nil {
			panic(err)
		}
		a = append(a, ai)
	}

	fmt.Println(taskSolution(a, h))
}


package main

import (
	"fmt"
)

func main() {
	var r int
	var i int
	fmt.Scan(&i)
	var x int
	fmt.Scan(&x)
	for  q:=0;q<i ;q++  {
		var z int
		fmt.Scan(&z)

		r += z/x
		if (z%x) >0{
			r++
		}
	}

	fmt.Println(r)

}