#include "triangles.h"
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>

using namespace std;
using ll = long long;

const int mod = 998244353;
const ll inf = 1e18;
const int INF = 1e9;

#define vec vector
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
#define rev reverse
#define umap unordered_map
#define pll pair<ll, ll>
#define pii pair<int, int>
#define len(a) int(a.size())
#define pb push_back

vector<vector<int>> solve(int n) {
    bool ok = false;
    int in = -1;
    for (int i = 0; i < n; i++) {
        vector<Triangle> left;
        for (int i1 = 0; i1 < n; i1++) {
            for (int i2 = i1 + 1; i1 < n; i1++) {
                if (i1 != i && i2 != i) {
                    left.pb({ Triangle(i1, i2, i) });
                }
            }
        }
        if (len(left) != 3) assert(0);
        vector<Triangle> right;
        vec<int> p;
        for (int i1 = 0; i1 < n; i1++) {
            if (i != i1) {
                p.pb(i1);
            }
        }
        right.pb({ Triangle(p[0], p[1], p[2]) });
        int compare_result = compare(left, right);
        if (compare_result == 0) {
            ok = true;
            in = i;
        }
    }
    vec<vec<int>> ans;
    if (ok) {
        vec<int> p;
        for (int i1 = 0; i1 < n; i1++) {
            if (i1 != in) p.pb(i1);
        }
        ans.pb(p);
    }
    else {
        vec<int> p;
        for (int i1 = 0; i1 < n; i1++) p.pb(i1);
        ans.pb(p);
    }
    /*
    // Example of compare:
    // Пример использования функции compare:
    std::vector<Triangle> left = { Triangle(0, 1, 2) };
    std::vector<Triangle> right = { Triangle(0, 1, 2) };
    int compare_result = compare(left, right);

    std::vector<std::vector<int>> ans;
    ans.push_back(std::vector<int>(n));
    for (int i = 0; i < n; ++i) {
        ans[0][i] = i;
    }
    return ans;
    */
    return ans;
}
