#include <bits/stdc++.h>
#include "triangles.h"

using namespace std;

#define int long long
#define pb push_back
#define endl "\n"
using ll = long long;
using pii = pair<int, int>;
using ld = long double;




std::vector<std::vector<int>> solve(int n){
    assert(n == 4);
    vector<int> s;
    for (int i = 0; i < n; ++i){
        s.pb(i);
    }
    for (int i= 0; i < n; ++i){
        s.erase(s.begin() + i);
        vector<Triangle> first;
        first.pb(Triangle(s[0], s[1], i));
        first.pb(Triangle(s[0], s[2], i));
        first.pb(Triangle(s[2], s[1], i));

        if (compare(first, {Triangle(s[0], s[1], s[2])}) == 0){
            vector<vector<int>> now;
            now.pb({s[0], s[1], i});
            now.pb({s[1], s[2], i});
            now.pb({s[2], s[0], i});
            return now;
        }
        s = {0, 1, 2, 3};
    }
    if (compare({Triangle(0, 1, 2), Triangle(0, 1, 3)}, {Triangle(2, 3, 0), Triangle(2, 3, 1)}) == 0){
        vector<vector<int>> now;
        now.pb({0, 1, 2});
        now.pb({0, 1, 3});
        return now;
    }
    if (compare({Triangle(0, 2, 1), Triangle(0, 2, 3)}, {Triangle(1, 3, 0), Triangle(1, 3, 2)}) == 0){
        vector<vector<int>> now;
        now.pb({0, 2, 1});
        now.pb({0, 2, 3});
        return now;
    }
    if (compare({Triangle(0, 3, 1), Triangle(0, 3, 2)}, {Triangle(1, 2, 0), Triangle(1, 2, 3)}) == 0){
        vector<vector<int>> now;
        now.pb({0, 3, 1});
        now.pb({0, 3, 2});
        return now;
    }
}