#include <iostream>
#include <vector>
#include <algorithm>
#include "triangles.h"
using namespace std;

vector<vector<int>> solve(int n)
{
    vector<int> p = {1, 2, 3};
    while (true)
    {
        Triangle a(0, p[0], p[1]), b(0, p[1], p[2]);
        Triangle c(p[0], p[1], p[2]), d(p[0], p[2], 0);
        vector<Triangle> l = {a, b}, r = {c, d};
        int res = compare(l, r);
        if (res == 0)
            return {{0, p[0], p[1], p[2]}};
        next_permutation(p.begin(), p.end());
    }
}
