#include "triangles.h"
#include <bits/stdc++.h>
using namespace std;


// 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<vector<int> > solve(int n) {
    vector<Triangle> left = {Triangle(0, 1, 2), Triangle(0, 2, 3)};
    vector<Triangle> right = {Triangle(1, 0, 3), Triangle(1, 2, 3)};
    int res = compare(left, right);
    if (res == 0) {
        vector<vector<int> > ret;
        ret.push_back({0, 1, 2, 3});
        return ret;
    }
    assert(0);

    vector<Triangle> che;
    che.push_back(Triangle(0, 1, 2));
    che.push_back(Triangle(0, 1, 3));
    che.push_back(Triangle(1, 2, 3));
    for (int i = 0; i < 3; i++) {
        int fla = 1;
        for (int j = 0; j < 3; j++) {
            left.clear();
            right.clear();
            left.push_back(che[i]);
            right.push_back(che[j]);
            res = compare(left, right);
            if (res == -1) fla = 0;
        }
        if (fla) {
            vector<vector<int> > ret;
            ret.push_back({che[i].i, che[i].j, che[i].k});
            return ret;
        }
    }
}
