#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_) {}
};*/

vector<vector<int>> solve(int n) {
    vector <int> arr;
    for (int i = 0; i < 4; ++i) {
        arr.push_back(i);
    }
    do {
        vector <Triangle> left = {Triangle(arr[0], arr[1], arr[2])};
        vector <Triangle> right = {Triangle(arr[0], arr[1], arr[3]), Triangle(arr[1], arr[2], arr[3]), Triangle(arr[0], arr[2], arr[3])};
        if (compare(left, right) == 0) {
            vector <vector <int>> ans;
            for (auto t : right) {
                ans.push_back({t.i, t.j, t.k});
            }
            return ans;
        }

    } while (next_permutation(arr.begin(), arr.end()));
    vector<vector<int>> ans;
    ans.push_back(vector<int>(n));
    for (int i = 0; i < n; ++i) {
        ans[0][i] = i;
    }
    return ans;
}
