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

using namespace std;

vector<vector<int> > solve(int n) {
    for (int i = 0; i < 4; ++i) {
        int t0 = i;
        vector<int> v;
        for (int j = 0; j < 4; ++j) {
            if (j == i)continue;
            v.push_back(j);
        }
        int t1 = v[0], t2 = v[1], t3 = v[2];
        vector<Triangle> lef = {{t0, t1, t2}, {t0, t1, t3}, {t0, t2, t3}}, rig = {{t1, t2, t3}};
        int it = compare(lef, rig);
        if (it == 0) {
            vector<vector<int> > ans = {{t0, t1, t2}, {t0, t1, t3}, {t0, t2, t3}};
            return ans;
        }
    }
    vector<Triangle> lef = {{0, 1, 2}, {0, 1, 3}}, rig = {{2, 3, 0}, {2, 3, 1}};
    int it = compare(lef, rig);
    if (it == 0) {
        vector<vector<int> > ans = {{0, 1, 2}, {0, 1, 3}};
        return ans;
    }
    lef = {{0, 2, 1}, {0, 2, 3}}, rig = {{1, 3, 0}, {1, 3, 2}};
    it = compare(lef, rig);
    if (it == 0) {
        vector<vector<int> > ans = {{0, 2, 1}, {0, 2, 3}};
        return ans;
    }
    vector<vector<int> > ans = {{0, 3, 1}, {0, 3, 2}};
    return ans;
}