#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <string>
#include <cassert>
#include "triangles.h"

#define ll long long
#define ld long double
#define ull unsigned long long
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

using namespace std;

const int MAX = 2e9;
const ll MIN = -9e18;
const int mod = 998244353;

int compare(const vector<Triangle> &left, const vector<Triangle> &right);

vector<vector<int> > solve(int n) {
    vector<Triangle> a = {{0, 1, 2}};
    vector<Triangle> b = {{0, 1, 3}};
    vector<Triangle> c = {{0, 2, 3}};
    vector<Triangle> d = {{1, 2, 3}};
    vector<Triangle> A = {{0, 1, 3}, {0, 2, 3}, {1, 2, 3}};
    vector<Triangle> B = {{0, 1, 2}, {0, 2, 3}, {1, 2, 3}};
    vector<Triangle> C = {{0, 1, 2}, {0, 1, 3}, {1, 2, 3}};
    vector<Triangle> D = {{0, 1, 2}, {0, 1, 3}, {0, 2, 3}};
    bool fl = 1;
    if (compare(a, A) == 0) {
        fl = 0;
    }
    if (compare(b, B) == 0) {
        fl = 0;
    }
    if (compare(c, C) == 0) {
        fl = 0;
    }
    if (compare(d, D) == 0) {
        fl = 0;
    }
    if (fl) {
        A={{0,1,2},{0,1,3}};
        B={{2,3,0},{2,3,1}};
        if (compare(A,B)==0) {
            return {{0,1,2},{0,1,3}};
        }
        A={{0,1,2},{0,2,3}};
        B={{2,3,1},{0,3,1}};
        if (compare(A,B)==0) {
            return {{0,1,2},{0,2,3}};
        }
        return {{0,3,2},{0,3,1}};
    }
    if (compare(a, b) >= 0 and compare(a, c) >= 0 and compare(a, d) >= 0) {
        return {{0, 1, 2}};
    }
    if (compare(b, c) >= 0 and compare(b, d) >= 0) {
        return {{0, 1, 3}};
    }
    if (compare(c, d) >= 0) {
        return {{0, 2, 3}};
    }
    return {{1, 2, 3}};
}
