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

std::vector<std::vector<int>> solve(int n) {
    if (n != 4) return {{}};
    vector<Triangle> a;
    a.push_back({0, 1, 2});
    a.push_back({0, 1, 3});
    a.push_back({0, 2, 3});
    a.push_back({1, 2, 3});
    vector<vector<int>> ans;
    for (int i = 0; i < 4; i++) {
        vector<Triangle> b;
        for (int j = 0; j < 4; j++) {
            if (i != j) b.push_back(a[j]);
        }
        bool flag = compare({a[i]}, b);
        if (flag == 0) {
            for (int j = 0; j < 4; j++) {
                if (i == j) {
                    ans.push_back({a[j].i, a[j].j, a[j].k});
                }
            }
            return ans;
        }
    }
    for (int i = 0; i < 4; i++) {
        for (int j = i + 1; j < 4; j++) {
            for (int z = 0; z < 4; z++) {
                for (int e = z + 1; z < 4; z++) {
                    if (i == z || i == e || j == z || j == e) continue;
                    vector<Triangle> le, ri;
                    le.push_back(a[i]);
                    le.push_back(a[j]);
                    ri.push_back(a[z]);
                    ri.push_back(a[e]);
                    if (compare(le, ri) == 0) {
                        ans.push_back({a[i].i, a[i].j, a[i].k});
                        ans.push_back({a[j].i, a[j].j, a[j].k});
                        return ans;
                    }
                }
            }
        }
    }
}
