#include <iostream>
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#include "triangles.h"

//#define int long long

template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
using ll = long long;
using vi = vector<int>;
using pi = pair<int, int>;
#define sz(x) (int)(x.size())
#define all(x) x.begin(), x.end()
//#define endl "\n"

template<class T>
istream& operator >> (istream& in, pair<T, T>& a) {
    in >> a.first >> a.second;
    return in;
}
template<class T>
istream& operator >> (istream& in, vector<T>& a) {
    for (T& x : a){
        in >> x;
    }
    return in;
}
template<class T>
ostream& operator << (ostream& out, pair<T, T> a) {
    out << a.first << " " << a.second << " ";
    return out;
}
template<class T>
ostream& operator << (ostream& out, vector<T> a) {
    for (auto& x : a) {
        out << x << " ";
    }
    return out;
}
#define debug(x) cout << (#x) << ": " << (x) << endl

constexpr int inf = 1e9 + 1;
constexpr ll INF = 1e18 + 1;

// struct Triangle {
//     int i, j, k;
//     Triangle() = default;
//     Triangle(int i_, int j_, int k_) : i(i_), j(j_), k(k_) {}
// };
//
// int compare(const std::vector<Triangle>& left, const std::vector<Triangle>& right);

vector<vi> solve(int n) {
    //n = 4
    Triangle t012(0, 1, 2), t013(0, 1, 3), t023(0, 2, 3), t123(1, 2, 3);

    vector<Triangle> L, R;

    L = {t012}, R = {t013, t023, t123};
    if (compare(L, R) == 0) {
        return {{0, 1, 2}};
    }

    L = {t013}, R = {t012, t023, t123};
    if (compare(L, R) == 0) {
        return {{0, 1, 3}};
    }

    L = {t023}, R = {t012, t013, t123};
    if (compare(L, R) == 0) {
        return {{0, 2, 3}};
    }

    // L = {t123}, R = {t012, t023, t013};
    // if (compare(L, R) == 0) {
    //     return {{1, 2, 3}};
    // }

    return {{0, 1, 2, 3}};
    //return {{}};
}