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

using namespace std;

std::vector<std::vector<int>> solve(int n) {
    vector<pair<Triangle, Triangle>> vars;
    vector<Triangle> vars2 = {Triangle(0, 1, 2), Triangle(0, 1, 3), Triangle(0, 2, 3), Triangle(1, 2, 3)};
    for (int i = 0; i < 4; i++) {
        for (int j = 0; j < 4; j++) {
            vars.push_back({vars2[i], vars2[j]});
        }
    }
    int best = 0;
    for (int i  = 1; i < vars.size(); i++) {
        if (compare({vars[best].first, vars[best].second}, {vars[i].first, vars[i].second}) == -1) {
            best = i;
        }
    }
    return {{vars[best].first.i, vars[best].first.j, vars[best].first.k}, {vars[best].second.i, vars[best].second.j, vars[best].second.k}};
}